Network Username

Discussion in 'ASP .Net' started by Geoff Murley, Apr 26, 2005.

  1. Geoff Murley

    Geoff Murley Guest

    Is there a simple command I can use to retrieve the
    username of the user currently logged onto a client PC,
    viewing my ASP.NET page?

    I really want the ASP.NET equivalent of
    SystemInformation.UserName
     
    Geoff Murley, Apr 26, 2005
    #1
    1. Advertising

  2. Geoff Murley

    Brock Allen Guest

    HttpContext.Current.User.Identity.Name, or just User.Identity.Name in the
    context of a page. This assumes you're using Windows authentication in your
    ASP.NET app.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Is there a simple command I can use to retrieve the username of the
    > user currently logged onto a client PC, viewing my ASP.NET page?
    >
    > I really want the ASP.NET equivalent of SystemInformation.UserName
    >
     
    Brock Allen, Apr 26, 2005
    #2
    1. Advertising

  3. Geoff Murley

    Geoff Murley Guest

    Hi, I am using Windows authentication , however, both of
    your suggestions return an empty string. Is there
    something else I should check?

    >-----Original Message-----
    >HttpContext.Current.User.Identity.Name, or just

    User.Identity.Name in the
    >context of a page. This assumes you're using Windows

    authentication in your
    >ASP.NET app.
    >
    >-Brock
    >DevelopMentor
    >http://staff.develop.com/ballen
    >
    >
    >
    >> Is there a simple command I can use to retrieve the

    username of the
    >> user currently logged onto a client PC, viewing my

    ASP.NET page?
    >>
    >> I really want the ASP.NET equivalent of

    SystemInformation.UserName
    >>

    >
    >
    >
    >.
    >
     
    Geoff Murley, Apr 26, 2005
    #3
  4. Geoff Murley

    Geoff Murley Guest

    I've got it to work now. I didn't turn off Allow
    Anonymous access in IIS.

    Thanks for your help.

    >-----Original Message-----
    >Hi, I am using Windows authentication , however, both of
    >your suggestions return an empty string. Is there
    >something else I should check?
    >
    >>-----Original Message-----
    >>HttpContext.Current.User.Identity.Name, or just

    >User.Identity.Name in the
    >>context of a page. This assumes you're using Windows

    >authentication in your
    >>ASP.NET app.
    >>
    >>-Brock
    >>DevelopMentor
    >>http://staff.develop.com/ballen
    >>
    >>
    >>
    >>> Is there a simple command I can use to retrieve the

    >username of the
    >>> user currently logged onto a client PC, viewing my

    >ASP.NET page?
    >>>
    >>> I really want the ASP.NET equivalent of

    >SystemInformation.UserName
    >>>

    >>
    >>
    >>
    >>.
    >>

    >.
    >
     
    Geoff Murley, Apr 26, 2005
    #4
  5. Geoff Murley

    Brock Allen Guest

    Check in IIS that you've disabled anonymous authentication for your application.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi, I am using Windows authentication , however, both of your
    > suggestions return an empty string. Is there something else I should
    > check?
    >
    >> -----Original Message-----
    >> HttpContext.Current.User.Identity.Name, or just

    > User.Identity.Name in the
    >
    >> context of a page. This assumes you're using Windows
    >>

    > authentication in your
    >
    >> ASP.NET app.
    >>
    >> -Brock
    >> DevelopMentor
    >> http://staff.develop.com/ballen
    >>> Is there a simple command I can use to retrieve the
    >>>

    > username of the
    >
    >>> user currently logged onto a client PC, viewing my
    >>>

    > ASP.NET page?
    >
    >>> I really want the ASP.NET equivalent of
    >>>

    > SystemInformation.UserName
    >
    >> .
    >>
     
    Brock Allen, Apr 26, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kal
    Replies:
    1
    Views:
    9,549
    Kevin Spencer
    Jun 21, 2004
  2. Replies:
    1
    Views:
    10,488
    Shawn
    Oct 17, 2005
  3. Replies:
    3
    Views:
    614
  4. Shailesh Patel
    Replies:
    0
    Views:
    478
    Shailesh Patel
    Nov 8, 2006
  5. NotGiven
    Replies:
    1
    Views:
    113
    Ray at
    Jan 21, 2004
Loading...

Share This Page