0

I'm having some issue with ADLDS authentication.

Every time I try to login I get the following error message on the machine where ADLDS is installed.

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.

I had installed few dev certs to allow SSL and I had some issue. So I removed all the certs I installed and now I get the following error. I reverted my code back to not use secure connection.

    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;
    }

But for some reason it still trying to do secure connection. Please note that I have some other code such as looking up user by GUIDID and that works without any issues. Anything that has to do with password is not working.

Any suggestions on how to fix this?

smr5
  • 2,593
  • 6
  • 39
  • 66

1 Answers1

0

Unfortunately, most of the times Microsoft's error messages are misleading. We were able to to resolve this issue by installing appropriate certificates on the server.

smr5
  • 2,593
  • 6
  • 39
  • 66
  • Hi im new to AD LDS, and definitely has no idea. but now i need to create an application to that need to authenticate users via AD LDS SSL. would be please be kind to provide me a reference if where should i start? thanks – dr.Crow Apr 29 '16 at 08:17
  • 1
    The code I have in my question will authenticate the user. The only thing you need to change is port number. Usually, the SSL port is 636. – smr5 Apr 29 '16 at 14:32