应用程序池身份运行的IIS 7.5站点中的DirectoryServicesCOMException 80072020

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再次工作的方法是重新启动服务器。
我找到了一个类似的问题在这里,但解决方案也是重新启动。我希望找到一个更持久的解决方案而不必更改应用程序池的标识。

结果发现我在搜索时过于详细了。在我发布这个问题之后,我找到了这个问题,它似乎是同样的问题,并提供了热修复程序作为解决方案。 - JStinebaugh
我认为你应该将这个作为答案发布并标记为“已接受”(如果这个网站允许的话)。这样可以让未来的访问者看到问题已经解决。 - Sam
好的,答案已添加。 - JStinebaugh
1个回答

5

2012年是否有热修补程序,或者可能存在不同原因导致的类似问题? - Christopher Painter
@ChristopherPainter 我没有进行详尽的搜索,但似乎2012年没有热修复补丁,但很可能这已经在2012/IIS 8中得到了修复,基于热修复补丁发布的时间。这只是我的猜测,没有参考来支持我在这里说的话。 - JStinebaugh

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接