【发布时间】:2017-03-03 04:37:51
【问题描述】:
我得到了可怕的:
无法自动进入服务器。无法调试远程过程。这通常表示服务器上尚未启用调试。"
现在,我一直在阅读我需要添加的内容
<compilation debug="true">
到 web.config 。
很公平,我的问题是我的 WCF 服务是托管在 Windows 进程中的 nettcp 绑定。
我在哪里添加这个?在windows服务的app.config中托管WCF服务?
在哪个部分?现在我的 Windows 服务主机的 app.config 看起来像这样:
<?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>
【问题讨论】: