我尝试通过 .NET 4 Web 服务的安全 SSL 连接连接到 Active Directory 轻型目录服务 2008 R2 的实例,但收到“服务器无法运行”的消息。错误。
- 我使用的用户是通过 ADSI 编辑器创建并置于管理员角色中的。
- 我能够使用 SSL 和简单绑定(bind)通过 ADSI 编辑器与该用户登录/连接,并且
- 我可以使用相同的用户凭据但使用非 SSL 端口连接 Web 服务。
- 我正在使用专有名称并且
- 用户绝对不是不活动的。
这是我用来绑定(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;
我也尝试过这样的:
DirectoryEntry entry2 = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local", "CN=ldapadmin,DC=nfa,DC=local", "P@ssw0rd", AuthenticationTypes.SecureSocketsLayer);
最佳答案
服务器需要安装 SSL 证书 meets the documented requirements 。测试与 LDP 的连通性。您将需要使用计算机的完全限定域名进行连接。将上面的 IP 地址替换为 FQDN,您就已经准备就绪。
关于asp.net - 如何通过 SSL 连接到 AD LDS?处理 "The server is not operational"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10702134/