问题描述
我有麻烦追捕在那里尝试获取用户组给定用户不时的ASP.NET 4应用失败的问题。与此应用程序相关联的应用程序池是设置ApplicationPoolIdentity下运行。
I'm having trouble hunting down an issue where an ASP.NET 4 application fails while trying to get user groups for a given user from time to time. The application pool associated with this application is setup to run under 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%,此功能工作正常,但不时,它只是开始出现问题。当我更改应用程序池使用本地系统或网络服务,它开始工作。当我变回ApplicationPoolIdentity它开始再次失败。拿到站点ApplicationPoolIdentity再次合作的唯一方法是重新启动服务器。
95%-99% of the time, this function works fine, but from time to time, it just starts failing. When I change the application pool to use LocalSystem or NetworkService, it starts working. When I change back to ApplicationPoolIdentity it begins failing again. The only way to get the site working again with ApplicationPoolIdentity is to reboot the server.
我能找到一个类似的问题,here,但分辨率是重新启动为好。我想找到改变应用程序池的标识更永久性的解决方案短。
I was able to find a similar issue here, but the resolution was a reboot as well. I'd like to find a more permanent solution short of changing the identity of the application pool.
推荐答案
虽然重启将暂时解决这个问题,有一个的,提供了一个永久性的修复这个问题。
While a reboot will resolve the issue temporarily, there is a Microsoft hotfix KB2545850 that offers a permanent fix to the issue.
这篇关于DirectoryServicesCOMException 80072020从IIS 7.5的网站下运行ApplicationPoolIdentity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!