Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Active Directory account from ASP.NET page?
Message
 
 
À
03/08/2005 13:49:53
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01037953
Message ID:
01038226
Vues:
22
>
>Dmitry,
>
>The user's NT account is linked to AD, so the web site would have to use impersonation to be aware of the user's NT/AD account. If this is the case, the NT account info is already attached to the HTTPApplication. You can get to the account name with CType(Application.User.Identity, System.Security.Principal.WindowsIdentity).Name. From there, if you want to get the AD properties associated with that name, you can use System.DirectoryServices.DirectorySearcher.
>
>Be aware that AD is a freeform cache of name-value pairs. If the directory is not expertly maintained, it will be very difficult to get meaningful data 100% of the time.

Keith,

Thank you very much for your helpful message.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform