6

我在寻找不时尝试获取给定用户的用户组时出现 ASP.NET 4 应用程序失败的问题时遇到了麻烦。与此应用程序关联的应用程序池设置为在 ApplicationPoolIdentity 下运行。

异常信息

System.DirectoryServices.DirectoryServicesCOMException
HRESULT: 80072020
Message: An operations error occurred.
Extended Message: 000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1

堆栈跟踪

    System.DirectoryServices.DirectoryEntry.Bind(Boolean) 
    System.DirectoryServices.DirectoryEntry.Bind() 
    System.DirectoryServices.DirectoryEntry.get_AdsObject() 
    System.DirectoryServices.DirectorySearcher.FindAll(Boolean) 
    System.DirectoryServices.DirectorySearcher.FindOne() 

在 95%-99% 的情况下,此功能可以正常工作,但有时会开始失败。当我将应用程序池更改为使用 LocalSystem 或 NetworkService 时,它​​开始工作。当我改回 ApplicationPoolIdentity 时,它再次开始失败。使站点再次使用 ApplicationPoolIdentity 的唯一方法是重新启动服务器。

我能够在这里找到类似的问题,但解决方案也是重新启动。我想找到一个更持久的解决方案,而不是更改应用程序池的身份。

4

1 回答 1

5

虽然重新启动将暂时解决问题,但有一个Microsoft 修补程序 KB2545850可以永久修复该问题。

于 2013-06-17T14:16:56.503 回答