Last post Mar 11, 2010 07:52 AM by johram
Mar 02, 2010 09:19 AM|myne8008|LINK
Real newbie question :-)
I currently get the current logged on user info from AD by using :
any help would be appreciated
Mar 02, 2010 10:48 AM|Goldnarms|LINK
Can't you use the User.Identity to fetch the additional data from where the data is stored? Just a thought..
Mar 03, 2010 02:37 AM|myne8008|LINK
Hi, if it is possibnle to use user.identity I would not know. Do you have examples of what I can do, most of the posts on the net is in C# and the ones I could find seems to be too complex for what I want to do.
Mar 03, 2010 10:04 AM|DeadTroll|LINK
What is your information store? SQL? AD? can't help much with the limited information you have provided.
Mar 04, 2010 01:14 AM|myne8008|LINK
it is a page done with VB, I have 3 labels on the page, the first label is assigned to :
the second label needs to get the current logged on users email address from active directory, not sql
the third label need to get the current logged on users manager from active directory.
Hope this helps
Mar 11, 2010 07:52 AM|johram|LINK
Using the account name that you get from User.Identity.Name, you need to fetch the object from AD to get extended properties such as email.
In order to do this, you'll need 1) the server name of the AD (for LDAP connection) and 2) a user to authenticate with. This user should be an existing AD user. Typically you can do this either by running the ASP.NET process as an AD (domain) user, or you
can specify (hard-code) the username and password. It is common to create an AD "service user" for this task, that may have only read-access.
For good examples in C# code (should give you an idea), you can check
And some VB.NET examples can be found on