Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code to retrieve currently logged in username
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00857332
Message ID:
00857376
Vues:
21
[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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform