asp.net - 如何通过 SSL 连接到 AD LDS?处理 "The server is not operational"错误

标签 asp.net .net wcf active-directory

我尝试通过 .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/

相关文章:

c# - ASP.NET MVC 元素仅在主页上而不在容器中

c# - 简易喷油器 : Factory classes that need to create classes with dependencies

c# - 使用 Xamarin.Forms 做背景

asp.net-mvc - MVC/WCF 和 Ado net Entity Framework

c# - ObjectDataSource 的 Select 方法中 ListBox 为 null

asp.net - 将服务器中的所有 webapp 置于离线状态

c# - winform 的动态代码编译在 C# 中给出错误

c# - 存储库、删除对象、模型与 ID

c# - 在n层c#层中设置连接

c# - 在 ConverterParameter 中使用枚举