I am working on a C# windows application, I have now faced a problem while authenticating a domain user with LDAP over SSL.
When I authenticate the user with BASIC authentication type the bind is successful, but while authenticating otherwise it is showing and error "LDAP Server is unavailable".
Why I try to authenticate with LDAP over SSL?
We have a client requirement where in the information of the AD is leaked (unencrypted information like DC=DomainName,DC=COM and other secured information) while using a security assessment tool "Echo Mirage". To over come this we need a secured way of authenticating the user credentials.
Here is the code I use, we analyzed on many such codes, but were not able to solve the purpose.
PrincipalContext domainContext = new PrincipalContext(ConteyxtType.Domain, serverIP);
isValid = domainContext.ValidateCredentials(username, password, ContextOptions.Negotiate | ContextOptions.SecureSocketLayer);
LdapConnection connection = new LdapConnection(serverIP);
NetworkCredential credential = new NetworkCredential(username, password);
connection.Credential = credential;
Can anyone help us in this and point us in the right direction.
And the configuration of LDAP in the SERVER is working fine.
Thanks in advance.