我有两个网站在我的 IIS 7.5 上运行。两者都在 80 端口上。由于它们都在同一个端口上,我必须停止一个来启动另一个。我没有使用内置的卡西尼服务器。使用 cassini 时调试工作正常。
我面临的问题是,当我尝试调试我的 mvc 应用程序(它是在第二个网站下创建的)时,我得到了错误:
Unable to start debugging on the web server. An unexpected DCOM error occurred while trying to automatically attach to the remote web server. Try manually attaching to the remote web server using the 'Attach To Process' dialog.
Web 应用程序启用了 Windows 身份验证。有什么想法吗?
其他详细信息:我能够执行“附加到进程”并对其进行调试。但无法使用 F5
进行调试最佳答案
虽然我试图远程调试在另一台机器上运行的简单 *.exe 应用程序,但我遇到了 OP 提到的非常相似的错误。
Unable to attach to the process. A DCOM error occurred trying to contact the remote computer. Access is denied.
It may be possible to avoid this error by changing your settings to debug only native code or only managed code.
我关注了this Microsoft 文档和以下步骤帮助解决了我的错误:
- 关闭 native 兼容模式和托管兼容模式。
您可以按照下面的屏幕截图来实现相同的效果:
我不需要重新启动机器。您也可以尝试这种方式,如果它不起作用,请继续重新启动机器。
关于asp.net - 尝试自动附加到远程 Web 服务器时出现意外的 DCOM 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9026011/