The server cannot handle directory requests while using PrincipalContext.ValidateCrendentials RRS feed

  • Question

  •  Hi

     I am getting the below exception while using PrincipalContext.ValidateCrendentials

    Things Which we tried are setting up the ContextOptions to below values, Still We are facing the same exception.

    ContextOptions.Negotiate | ContextOptions.Signing | ContextOptions.Sealing | ContextOptions.SecureSocketLayer

    also We are getting this error only for particular machine/server  the same code is working fine for rest of the server 

    What is the possible cause for this issue to us it looks more like environment setting on the server side

    Exception Details :

    The server cannot handle directory requests.   at System.DirectoryServices.Protocols.ErrorChecking.CheckAndSetLdapError(Int32 error)

       at System.DirectoryServices.Protocols.LdapSessionOptions.FastConcurrentBind()

       at System.DirectoryServices.AccountManagement.CredentialValidator.BindLdap(NetworkCredential creds, ContextOptions contextOptions)

       at System.DirectoryServices.AccountManagement.CredentialValidator.Validate(String userName, String password)

       at System.DirectoryServices.AccountManagement.PrincipalContext.ValidateCredentials(String userName, String password)

       at ActiveDirectory.frmActiveDirectory.IsValidActiveDirectoryCredential(String userName, String password)

    Thursday, April 6, 2017 1:46 PM

All replies

  • Hi Jitendrapuri Goswami,

    According to your description, it works for some of service, but not work for particular machine/server, it seems that it is a configuration issue.

    Please check the user of the app pool if this is running on IIS.

    The following thread has a similar issue, which turned out that IIS on the server was set up to run as LocalMachine,  please change it to NetworkService (the default).


    Best regards,

    Cole Wu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 7, 2017 1:27 AM