English 中文(简体)
如何在 SSL 上连接到 ADLDS? 处理“ 服务器没有操作” 错误
原标题:How to connect to AD LDS over SSL? Dealing with "The server is not operational" error

我正在尝试连接到一个活动目录轻量级目录服务的例子 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);
问题回答

服务器需要安装一个 SSL 证书,该证书应安装在 < a href="http://support.microsoft.com/kb/32851] rel=“nofollow”>meet 文档中的要求 。 测试与 LDP 的连接。 您需要使用完全合格的机器域名连接。 上面的 IP 地址由 FQDN 替换, 您应该全部设置 。

@ColinBowern提到您需要提供完全合格的域名(FQDN)而不是IP, 因为证书是发给FQDN的。

首先,核实在远程机器上向AD LDS注册的证书安装正确无误:

  1. Run certmgr.
  2. Verify the Certificate Authority (CA) that issued the certificate exists in the Trusted Root Certification AuthorityCertificates store.
  3. Verify the certificate exists in the PersonalCertificates store with the correct FQDN (the domain name of the remote machine), issued by the above CA and of type "Server Authentication".

第二, FQDN might not 正确解析到远程机器, 原因是 DNS 注册错误。 验证本地机器将正确的 IP 映射到 FQDN (如证书名称所示) 。 如果没有条目, 需要添加 IP IP 。

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




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签