asp.net – DirectoryServicesCOMException 80072020来自IIS 7.5在ApplicationPoolIdentity下运行的站点

我无法找到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重新启动站点的唯一方法是重新启动服务器.

我能够找到类似的问题here,但解决方案也是重启.我想找到一个更永久的解决方案,而不是改变应用程序池的身份.

解决方法

虽然重新启动会暂时解决问题,但有一个 Microsoft hotfix KB2545850可以永久解决问题.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....