ADLDS SSL 证书颁发身份验证失败

ADLDS SSL certificate issue authentication failing

我在 ADLDS 身份验证方面遇到了一些问题。

每次尝试登录时,我都会在安装了 ADLDS 的机器上收到以下错误消息。

No suitable default server credential exists on this system. This will prevent server applications that expect to make use of the system default credentials from accepting SSL connections. An example of such an application is the directory server. Applications that manage their own credentials, such as the internet information server, are not affected by this.

我安装了一些开发证书来允许 SSL,但我遇到了一些问题。所以我删除了我安装的所有证书,现在我收到以下错误。我将我的代码恢复为不使用安全连接。

    protected ContextOptions _contextOptions = ContextOptions.Negotiate;
    protected PrincipalContext getPrincipal()
    {
        return new PrincipalContext(ContextType.ApplicationDirectory, "myserver.public:11389", "CN=mycontainer,DC=t,DC=public", _contextOptions);
    }

    //Authenticate users against AD LDS 
    public bool Authenticate(string username, string password)
    {
        bool isAuthenticated = false;
        using (PrincipalContext pCtx = getPrincipal())
        {
            isAuthenticated = pCtx.ValidateCredentials(username, password);
        }
        return isAuthenticated;
    }

但出于某种原因,它仍在尝试进行安全连接。请注意,我还有一些其他代码,例如通过 GUIDID 查找用户,并且没有任何问题。与密码有关的任何内容均无效。

关于如何解决这个问题有什么建议吗?

不幸的是,大多数时候 Microsoft 的错误消息都是误导性的。我们能够通过在服务器上安装适当的证书来解决此问题。