Stupid beginners question: Windows Username

Discussion in 'ASP .Net' started by Child, Jun 1, 2005.

  1. Child

    Child Guest

    my application needs to retrieve windows username - anon authentication is
    OFF, auth mode in web.config is "windows".
    I get machine name with
    Dim ident As WindowsIdentity = WindowsIdentity.GetCurrent()
    txtUser.Text = ident.Name

    What do i need to find username?



    TIA!!
     
    Child, Jun 1, 2005
    #1
    1. Advertising

  2. Once you use Windows authentication and deny anonymous access, you can get
    Domain/username by

    Context.User.Identity.Name

    HTH

    Elton Wang



    "Child" wrote:

    > my application needs to retrieve windows username - anon authentication is
    > OFF, auth mode in web.config is "windows".
    > I get machine name with
    > Dim ident As WindowsIdentity = WindowsIdentity.GetCurrent()
    > txtUser.Text = ident.Name
    >
    > What do i need to find username?
    >
    >
    >
    > TIA!!
    >
    >
    >
     
    =?Utf-8?B?RWx0b24gVw==?=, Jun 1, 2005
    #2
    1. Advertising

  3. Child

    souri challa Guest

    Re: Stupid beginners question: Windows Username

    Try User.Identity.Name
    -Souri
     
    souri challa, Jun 1, 2005
    #3
    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. Alex
    Replies:
    1
    Views:
    309
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 19, 2004
  2. Mike P

    web service beginners question

    Mike P, Aug 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    764
    S. Justin Gengo
    Sep 21, 2004
  3. Brandon McCombs
    Replies:
    4
    Views:
    535
    Richard Wheeldon
    Aug 28, 2006
  4. rincewind

    stupid, STUPID question!

    rincewind, Apr 19, 2009, in forum: HTML
    Replies:
    25
    Views:
    1,061
  5. Shailesh Patel
    Replies:
    0
    Views:
    494
    Shailesh Patel
    Nov 8, 2006
Loading...

Share This Page