ActiveDirectoryMembershipProvider ASP.NET 2.0

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?
 
P

Patrick.O.Ige

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
 
A

Arnel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top