I am trying to validate a user against Active Directory. I current use the following code and it works fine:
bool authentic = false;
PrincipalContext pc = new PrincipalContext(ContextType.Domain, domain);
// validate the credentials against domain. authentic is True if the account is valid, false if it fails
authentic = pc.ValidateCredentials(userName, password);
I pass in the Windows Domain, username, and password into the method and the method returns a true or false depending on the validity of the user account.
Now I have a new requirements that I must use SSL when making calls to LDAP. How can I convert the code above so that I do the same thing but using LDAP over SSL?
Thank you in advance for any help you can provide.