I am trying to connect to the Active Directory in order to search for a user. The server that I am hosting on has a certificate problem and as a result, my code is not running on the testing server. I need a way to ignore certificate errors using DirectorySearcher class.
I tried to use LDAPConnection and added the following lines
connection.SessionOptions.SecureSocketLayer = true; connection.SessionOptions.VerifyServerCertificate = new VerifyServerCertificateCallback((con, cer) => true);
However I need to use the same however using DirectorySearcher and DirectoryEntry.
Does anyone has a way that can assist me???