【问题标题】:Unable to automatically step into the server. The remote procedure could not be debugged无法自动进入服务器。无法调试远程过程
【发布时间】:2023-03-15 00:30:01
【问题描述】:

我在进入托管在 IIS7 上的网站的代码时遇到问题。

基本上我有一个像这样调用 WCF 服务的测试类

ISecurityService service = new SecurityServiceClient();
MembershipUser membershipUser = null;
membershipUser = service.GetMembershipUser("Mark"); // THIS LINE FAILS!!!

我收到以下错误,但据我所知,我已启用所有功能,即

<compilation debug="true" targetFramework="4.0" />

这是错误消息,如果有任何反馈,我将不胜感激。如果我不尝试进入上面的行,那么一切正常。


微软视觉工作室

无法自动进入服务器。无法调试远程过程。这通常表示服务器上没有启用调试。有关详细信息,请参阅帮助。

【问题讨论】:

    标签: wcf debugging iis remote-debugging


    【解决方案1】:

    不要忘记在您的 wcf 服务 web.config 文件中设置编译 debug="true"。

    【讨论】:

      【解决方案2】:

      你是否有机会使用 vista?

      不管怎样,看看这个帖子: http://mvolo.com/blogs/serverside/archive/2006/12/28/Fix-problems-with-Visual-Studio-F5-debugging-of-ASP.NET-applications-on-IIS7-Vista.aspx

      希望对你有帮助

      编辑:也看看这里 Return MembershipUser using WCF service

      【讨论】:

      • 实际上我使用的是 Windows 7,如果我执行 F5,它工作正常......当我尝试从我的测试所在的类 libraru 进入我的 wcf 服务器(托管在 IIS 中)时
      【解决方案3】:

      您也可以尝试在 IIS 中开启匿名身份验证。当我遇到这个问题时,这对我有用。

      【讨论】:

        【解决方案4】:

        我遇到了同样的错误。问题是 IIS 上的 WCF Web 服务站点已停止,因为另一个进程占用了同一个端口!

        要发现进程是什么,从命令提示符:

        netstat -aon | find ":your_iis_web_services_port_number" 
        

        希望对您有所帮助。

        【讨论】:

          【解决方案5】:

          dont forget to set compilation debug="true" in your wcf service web.config file.

          如果您的启动项目与所讨论的 WCF 服务不同并且您已选中 start wcf service host when debugging another project in the same solution,则需要在该项目 App.config 中设置 compilation debug="true"

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2014-05-19
            • 1970-01-01
            • 1970-01-01
            • 2017-06-12
            • 2011-09-02
            • 2019-05-15
            • 2012-12-07
            • 2014-01-07
            相关资源
            最近更新 更多