我正在尝试连接到一个活动目录轻量级目录服务的例子 2008 R2, 通过一个由.NET 4 网络服务连接的安全的 SSL 连接, 我正在获取“ 服务器无法运行”。 错误 。
- 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.
这是我用来绑定的代码:
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;
我也试过这样:
DirectoryEntry entry2 = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local", "CN=ldapadmin,DC=nfa,DC=local", "P@ssw0rd", AuthenticationTypes.SecureSocketsLayer);