I am trying to connect to an instance of Active Directory Lightweight Directory Services 2008 R2 via a secured SSL connection from a .NET 4 web service, and I'm getting "The server is not operational." error.
- I am using a user which was created using the ADSI Editor and placed in the Administrator Role.
- I am able to login/connect via ADSI editor with this user using SSL and simple binding, and
- I can connect with the web service using the same user credentials but using the non-SSL port.
- I am using the distinguished name and
- the user is definitely not inactive.
Here is the code that I use to bind:
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 have tried it like this as well:
DirectoryEntry entry2 = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local", "CN=ldapadmin,DC=nfa,DC=local", "P@ssw0rd", AuthenticationTypes.SecureSocketsLayer);