Last post Mar 17, 2020 07:52 AM by PatriceSc
Mar 16, 2020 11:53 AM|Praveen Chakrala|LINK
I can't connect my c# application to a LDAPS server.
Earlier, i was able to connect to LDAP server by using the following code:
string srvr = ConfigurationManager.AppSettings["LDAP_SERVER"]; //where "LDAP_SERVER" is server url ex: "LDAP//domain_name".
DirectoryEntry entry = new DirectoryEntry(srvr, usr, pwd); // usr-domain user id , pwd-domain password
object nativeObject = entry.NativeObject;
But, recently we had to update our servers to LDAPS. The above code does not work with LDAPS server (server url looks like "LDAPS://ldap.domain_name").
Can anyone suggest on how to authenticate users over LDAPS server?
Thanks in advance.
Mar 16, 2020 12:52 PM|PatriceSc|LINK
A Windows admin forum could be better but it seems they use port 636 instead. What happens if you try LDAP://ldap.domain_name:636 ?
Mar 17, 2020 01:37 AM|Praveen Chakrala|LINK
Thanks for the quick reply.
I tried to add port number as well like&quot; ldaps://ldap.domain_name:636&quot; but no success. Actually we need to use LDAPS protocol instead of LDAP. So is there a solution for LDAPS?
Mar 17, 2020 07:52 AM|PatriceSc|LINK
What I meant is that every documentation I found seems to use ldap and port 636 for testing rather than a ldaps prefix.
Try maybe https://support.microsoft.com/en-us/help/321051/how-to-enable-ldap-over-ssl-with-a-third-party-certification-authority and
"Verifying an LDAPS connection".
If it still doesn't work a Windows admin forum could be better. Also there rather than telling just that it doesn't work, tell them what actually happens (you don't have an error message ?)