Wednesday, September 18, 2013

How to get the current User Windows Logon Details: WindowsIdentity.GetCurrent()

How to get the current User Windows Logon Details:
WindowsIdentity.GetCurrent()

This code was used once to get the Current user's windows logon name.
The application was published on a webserver and this code worked to get
the end user's Windows Logon Name, so how could this happen when this code
is actually running in the code behind on the server itself?
Dim CurrentUser As String =
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString
Please explain to me if you can.

No comments:

Post a Comment