无法调试WCF时自动步入服务器 [英] Unable to automatically step into the server when debugging WCF

查看:244
本文介绍了无法调试WCF时自动步入服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了可怕的:

无法自动步到服务器。远程过程不能debugged.This通常表明调试尚未在服务器上启用。

现在,我一直在读,我需要添加

 <编译调试=真正的>
 

到Web.config。

很公平,我的问题是,我的WCF服务是一个nettcp绑定托管在Windows进程。

我在哪里可以添加此?在窗口服务的app.config hostiung WCF服务?

在哪个部门?现在我的app.config为Windows服务主机看起来是这样的:

 < XML版本=1.0编码=UTF-8&GT?;

<结构>

  < system.serviceModel>
    <服务>
      <服务名称=索引behaviorConfiguration =IndexerServiceBehavior>
        <主机>
          < baseAddresses>
            <新增baseAddress =HTTP://本地主机:8000 /索引/>
          < / baseAddresses>
        < /主机>
        <端点地址=的net.tcp://本地主机:9000 /索引
                  绑定=NetTcpBinding的
                  bindingConfiguration =Binding1
                  合同=WCF.IIndexer/>
      < /服务>
    < /服务>
    <绑定>
      < NetTcpBinding的>
        <绑定名称=Binding1
                     hostNameComparisonMode =StrongWildcard
                     的SendTimeout =00:10:00
                     maxReceivedMessageSize =65536
                     transferMode =缓冲
                     portSharingEnabled =假>
          <安全模式=无>
            <交通运输clientCredentialType =无/>
            <消息clientCredentialType =无/>
          < /安全>
        < /装订>
      < / NetTcpBinding的>
    < /绑定>
    <行为>
      < serviceBehaviors>
        <行为NAME =IndexerServiceBehavior>
          < serviceMetadata httpGetEnabled =真httpGetUrl =/>
          < serviceDebug includeExceptionDetailInFaults =FALSE/>
        < /行为>
      < / serviceBehaviors>
    < /行为>

  < /system.serviceModel>

< /结构>
 

解决方案

我刚刚有同样的问题。为了能够调试WCF服务,您应该添加在里面的部分服务器的配置文件。

有关详细信息,请查看链接: <一href="http://msdn.microsoft.com/en-us/library/bb157687.aspx">http://msdn.microsoft.com/en-us/library/bb157687.aspx

I get the dreaded:

Unable to automatically step into the server. The remote procedure could not be debugged.This usually indicates that debugging has not been enabled on the server."

Now, I have been reading that I need to add

<compilation debug="true">

to the web.config .

Fair enough, my problem is that my WCF service is a nettcp binding hosted in a windows process.

Where do I add this? In the app.config of the windows service hostiung the WCF service?

In what section? Right now my app.config for the Windows Service Host looks like this :

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <system.serviceModel>
    <services>
      <service name="Indexer" behaviorConfiguration="IndexerServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8000/Indexer"/>
          </baseAddresses>
        </host>
        <endpoint address="net.tcp://localhost:9000/Indexer"
                  binding="netTcpBinding"
                  bindingConfiguration="Binding1"
                  contract="WCF.IIndexer" />
      </service>
    </services>
    <bindings>
      <netTcpBinding>
        <binding name="Binding1"
                     hostNameComparisonMode="StrongWildcard"
                     sendTimeout="00:10:00"
                     maxReceivedMessageSize="65536"
                     transferMode="Buffered"
                     portSharingEnabled="false">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="IndexerServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>

  </system.serviceModel>

</configuration>

解决方案

I have just had the same problem. In order to be able to debug a WCF service, you should add the in the server's config file inside the section.

For more details, please check the link: http://msdn.microsoft.com/en-us/library/bb157687.aspx

这篇关于无法调试WCF时自动步入服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆