Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get Active Directory account from ASP.NET page?
Message
 
 
To
03/08/2005 13:49:53
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01037953
Message ID:
01038226
Views:
23
>
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform