ActiveDirectoryMembershipProvider ASP.NET 2.0

  • Thread starter Thread starter Arnel
  • Start date Start date
A

Arnel

I have a web app which uses the new ASP.NET 2.0 login control to
authenticate against active directory. Now, I would like to use the
new namespaces (ActiveDirectoryMembershipProvider,
ActiveDirectoryMembershipUser, MembershipUser, Membership, etc) to
retrieve the logged in user properties available. I have been able to
get the logged in username when using Forms auth. with the following
code. Unfortunately, it doesn't work when I use Windows auth:

MembershipUser LoginName = Member.GetUser(User.Identity.Name)

Does anyone know how to retrieve the various properties available for
AD users?
 
For it to work for Windows auth you would have to set that on IIS
Go to IIS >Security and uncheck Anonymous logon and check integrated Windows
Auth.
Hope that helps
Patrick
 
Thanks, Patrick. But I've already set this. I have no problem
authenticating against AD, and I can retrieve user account properties
using System.DirectoryServices. However, I cannot seem to get the new
classes in ASP.NET 2.0 to work. I want to avoid using the
DirectoryServices namespace because I would like to utilize the
ADmembership provider in 2.0.
 
Back
Top