Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code to retrieve currently logged in username
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00857332
Message ID:
00857394
Views:
25
Thanks for the info - exactly what I was looking for.

>[VB]
>Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent())
>Dim username As String = wp.Identity.Name
>
>
>[C#]
>WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
>String username = wp.Identity.Name;
>
>Don't for get to SetPrincipalPolicy
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingwindowsidentitywindowsprincipalobjects.asp
>
>>Is there simple method to retrieve the currently logged in username (i..e the Windows username)
Al Williams

Anola MB, CANADA
Previous
Reply
Map
View

Click here to load this message in the networking platform