在发布错误:System.DirectoryServices.DirectoryServicesCOMException错误、System、DirectoryServicesCOMException、

2023-09-09 21:40:55 作者:少女贩卖机

我在我的asp.net MVC解决方案使用AD认证。它在本地服务器上的工作,但是当我发表我的错误:System.DirectoryServices.DirectoryServicesCOMException:出现操作错误。有谁知道我有什么关系?

I'm using the AD authentication in my asp.net MVC solution. It's working in a local server, but when I publish it I get the error: "System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.". Does anybody know what I have to do?

推荐答案

验证是否要发布的dll文件:System.DirectoryServices.dll程序和System.DirectoryServices.AccountManagement.dll

Verify if you are publishing the dlls: System.DirectoryServices.dll and System.DirectoryServices.AccountManagement.dll.

转到在你的web项目引用,发现两个引用,preSS F4(属性选项卡),并设置复制本地到真。

Go to References in your web project, find both references, press f4 (properties tab), and set "Copy Local" to "True".

- 后来添加

后,验证您的IIS,如果设置Asp.Net模拟已启用。 (点击在IIS的Web应用程序,而此前,在授权图标)

After, verify in your iis, if the setting "Asp.Net Impersonation" is enable. (Click in your web app in iis, and after, in Authorization icon)

 
精彩推荐
图片推荐