使用PrincipalContext.ValidateCrendentials时,服务器无法处理目录请求 [英] The server cannot handle directory requests while using PrincipalContext.ValidateCrendentials

查看:88
本文介绍了使用PrincipalContext.ValidateCrendentials时,服务器无法处理目录请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 嗨

 使用PrincipalContext.ValidateCrendentials时出现以下异常

 I am getting the below exception while using PrincipalContext.ValidateCrendentials

我们尝试将ContextOptions设置为以下值,但我们仍然面临相同的例外.

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

也出现了此错误仅适用于特定的机器/服务器 相同的代码对于其余的服务器都可以正常工作

可能的原因是什么这个问题对我们来说更像是服务器端的环境设置

异常详细信息:

服务器无法处理目录请求.在System.DirectoryServices.Protocols.ErrorChecking.CheckAndSetLdapError(Int32错误)上

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

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

  在System.DirectoryServices.AccountManagement.CredentialValidator.BindLdap(NetworkCredential凭据,ContextOptions contextOptions)中

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

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

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

  在System.DirectoryServices.AccountManagement.PrincipalContext.ValidateCredentials(字符串userName,字符串密码)处

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

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

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

推荐答案

您好,Jitendrapuri Gos wami,

根据您的描述,它适用于某些服务,但不适用于特定的机器/服务器,似乎是配置问题.

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.

请检查应用程序池的用户是否正在IIS上运行.

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

以下线程有一个类似的问题,事实证明服务器上的IIS已设置为以LocalMachine的身份运行.请将其更改为NetworkService(默认).

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).

http://stackoverflow.com/questions/3694919/nets-directory -服务抛出一个奇怪的异常

最诚挚的问候,

吴可乐


这篇关于使用PrincipalContext.ValidateCrendentials时,服务器无法处理目录请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆