That makes sense, I just dont know how to work with certificates i guess. But
hopefully our customers trying to integrate LDAP authentication with our
application will....I guess I need to provide configuration options for using
SSL, the LDAP Search Root, and the Server Context
My authentication code is as follows: using S.DS.P objects
LdapConnection con = new LdapConnection(new
LdapDirectoryIdentifier(this.SearchRoot), new
System.Net.NetworkCredential(string.Empty, string.Empty), AuthType.Basic);
con.SessionOptions.SecureSocketLayer = this.UseSSL;
using (con)
{
con.Bind();
SearchRequest request = new SearchRequest("o=" + this.Context, "(uid="
+ this.tbUserName.Text + ")",
System.DirectoryServices.Protocols.SearchScope.Subtree);
SearchResponse response = (SearchResponse)con.SendRequest(request);
SearchResultEntry entry = response.Entries[0];
string dn = entry.DistinguishedName;
con.Credential = new NetworkCredential(dn, this.tbPassword.Text);
con.Bind();
}
in local testing i also have a line
con.SessionOptions.VerifyServerCertificate = new
VerifyServerCertificateCallback(ServerCallback);
which simply returns true because i cant seem to get my certificates
validated.