我在我的asp.net MVC解决方案中使用AD身份验证。它在本地服务器上工作,但是当我发布它时,出现错误:“System.DirectoryServices.DirectoryServicesCOMException:发生操作错误。”。有人知道我必须做什么吗?发布时出错:System.DirectoryServices.DirectoryServicesCOMException
2
A
回答
2
验证您是否正在发布dll:System.DirectoryServices.dll和System.DirectoryServices.AccountManagement.dll。
转到Web项目中的参考,找到两个参考,按f4(属性选项卡),并将“Copy Local”设置为“True”。
- 后来
后,验证您的IIS,如果设置 “Asp.Net模拟” 是能够增加。 (点击在IIS的web应用程序,而此前,在授权图标)
0
我发现这部分代码和它的作品现在:
using (HostingEnvironment.Impersonate()) {
// This code runs as the application pool user
DirectorySearcher searcher ...
}
http://sanjaymungar.blogspot.com/2010_07_01_archive.html 或 http://sharepoint-tweaking.blogspot.com/2007/12/impersonation-in-aspnet-causes.html
相关问题
- 1. System.DirectoryServices.DirectoryServicesCOMException:发生操作错误。
- 2. System.DirectoryServices.DirectoryServicesCOMException
- 3. System.DirectoryServices.DirectoryServicesCOMException(0x8007203B):发生本地错误
- 4. ClickOnce发布时出错
- 5. 错误System.DirectoryServices.DirectoryServicesCOMException(0x8007203B):出现了一个本地错误
- 6. 在IIS7中发布网站时出错
- 7. Azure iOS SDK发布时出错
- 8. 在墙上发布消息时出错
- 9. 在LinkedIn上发布数据时出错?
- 10. 在Umbraco中发布数据时出错
- 11. 发布Web服务时出错
- 12. 在matlab中发布代码时出错
- 13. 在vk中发布状态时出错
- 14. Google Assistant SDK 0.2.0发布时出错
- 15. 发布ASP.NET Core项目时出错
- 16. 在发布到Twitter时出错
- 17. 调试发布版本时出错
- 18. 使用.Net DLL发布时出错
- 19. 发布Django-CMS 2.4页面时出错
- 20. 发布应用程序时出错
- 21. 使用ajax发布数据时出错?
- 22. 发布Sitefinity4项目时出错
- 23. 在ubuntu上发布git repo时出错
- 24. 使用JQuery发布请求时出错
- 25. 发布webforms项目时出错
- 26. SSDT发布时出错但未生成
- 27. 通过JMX发布Bean时出错
- 28. ObjectContext Dev中出错但未发布时
- 29. 发布ASP.NET应用程序时出错
- 30. 使用ninject发布内容时出错?
我已经设置此配置。 – Leila 2012-02-07 18:23:57
如果设置“Asp.Net模拟”启用,请在您的iis中验证。 (在iis中点击您的web应用程序,然后在Authorization图标中) – 2012-02-07 18:30:44