Stupid beginners question: Windows Username

  • Thread starter Thread starter Child
  • Start date Start date
C

Child

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!!
 
Once you use Windows authentication and deny anonymous access, you can get
Domain/username by

Context.User.Identity.Name

HTH

Elton Wang
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top