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:
00857394
Vues:
26
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform