C# – Porting Active Directory Authentication to use SQL Membership Provider

active-directoryasp.net-membershipcsqlmembershipprovider

I'm looking at moving my application from using active directory membership provider to using sql server provider. The main hiccup we are looking at is no being able to retrieve the user passwords from AD. Does anybody have any ideas? Anybody think I should just leave AD alone?

Best Answer

You will not be able to retrieve passwords from AD - by design and for security reasons. You can check your credentials (username and password the user has entered) against AD - but you cannot extract the passwords from AD - no can do.

To check the credentials, you can use the "ValidateUser" method on the ActiveDirectoryMembershipProvider in .NET - this will tell if you a username/password is valid.