How to connect to AD LDS via SSL? Work with the error "Server is down"

I try to connect to an Active Directory instance of Lightweight Directory Services 2008 R2 through a secure SSL connection from the .NET 4 web service, and I get "Server is down." error.

  • I am using a user that was created using the ADSI editor and placed in the administrator role.
  • I can login / connect via ADSI editor with this user using SSL and simple binding, and
  • I can connect to the web service using the same user credentials but using a non-SSL port.
  • I use a distinguished name and
  • the user is definitely not working.

Here is the code I use for binding:

 DirectoryEntry entry = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local");
            entry.Username = "CN=ldapadmin,DC=nfa,DC=local";       
            entry.Password = "P@ssw0rd";
            entry.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;

I also tried this:

DirectoryEntry entry2 = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local", "CN=ldapadmin,DC=nfa,DC=local", "P@ssw0rd", AuthenticationTypes.SecureSocketsLayer);
+3
source share
2

SSL, . LDP. , . IP- .

+2

@ColinBowern, (FQDN) IP, FQDN.

, , AD LDS , :

  • certmgr.
  • , Trusted Root Certification Authority\Certificates , .
  • , Personal\Certificates ( ), , " ".

-, - DNS. , hosts ( C:\Windows\System32\drivers\etc) IP ( ). , ,

192.168.1.34    domain.name    # <-- FQDN as shown in the certificate
0

All Articles