In my website i want to use active directory users for authentication. how can i do this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need to do programmatic validation of credentials against Active Directory, you should use the new
System.DirectoryServices.AccountManagementclasses that are available in .NET 3.5.Read the Managing Directory Security Principals in the .NET Framework 3.5 in the January 2008 issue of MSDN Magazine for more info. NOTE: only CHM download
For validating credentials, you’d have to create a principal context – either a machine (single server) or domain (network) and then call the
.ValidateCredentials()method on it:Pretty simple, isn’t it?? This works great if your users need to log in using a form where they enter username and password and you can grab these to check their account.