Stupid beginners question: Windows Username

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!!
 
G

Guest

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

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top