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:
00857376
Views:
22
[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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform