TooncesLives
Limp Gawd
- Joined
- Mar 11, 2005
- Messages
- 188
Most of my web programming has always been in PHP, but I was told to take an exisiting application and convert it to .net. I want to use a form to authenticate a user against out active directory through LDAP. I used the tutorial below from Microsoft, and I can authenticate with LDAP. After I authenticate, I want to be able to show the user's givenname on the protected pages. Does anyone have any ideas as to how that might work? I can use User.Identity.Name to display the username of the person, but I need the given name. If that works, I'd like to use the same principle to display other ldap info such as phone and address.
Since the actual authentication and search against the directory is done in the ldapauthentication class, does that mean the information in that class isn't accessible to my actual web pages? If I could access items such as strings in that class, what do I need to do for imports on my aspx page, and how would I specify that I'm referencing a string from that class? Sorry if this is really basic stuff, but I'm new to all this.
Also, I added search.PropertiesToLoad.Add("givenName") as a property to load if the common name is found. I still don't know how I would just display that given name on the subsequent pages though.
http://support.microsoft.com/kb/326340
Thanks!
Since the actual authentication and search against the directory is done in the ldapauthentication class, does that mean the information in that class isn't accessible to my actual web pages? If I could access items such as strings in that class, what do I need to do for imports on my aspx page, and how would I specify that I'm referencing a string from that class? Sorry if this is really basic stuff, but I'm new to all this.
Also, I added search.PropertiesToLoad.Add("givenName") as a property to load if the common name is found. I still don't know how I would just display that given name on the subsequent pages though.
http://support.microsoft.com/kb/326340
Thanks!