我有一個netTcp WCF
服務在遠程計算機上的Windows服務中運行。 Windows服務運行爲用戶mydomain\u2
調試netTcp WCF綁定
的.config
文件爲windows服務承載WCF是
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" />
</security>
現在,當我運行
svcutil.exe的http://wcfhostmachine:8000/MyWCFService?wsdl
客戶端output.config
具有以下安全端口離子:
<security mode="None">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
它們是不同的。 爲什麼?如果我更改客戶端以匹配服務器?
雖然我仍然可以發送指令到WCF
服務,它們被處理,在Visual Studio中嘗試步入遠程主機上運行的WCF
代碼,我得到了臭名昭著:
無法自動調試'....'。連接到服務器機器失敗。目標計算機上的Visual Studio遠程調試器無法連接回此計算機。確保在目標計算機上正確配置了DNS
。
不用說DNS
是好的。
我能想到爲什麼我遇到這種情況的唯一原因是因爲我的Visual Studio運行的是mydomain\u1
,並且該服務在遠程計算機上運行爲mydomain\u2
。
過去有沒有人遇到過這個問題?
更多信息
下面是我的App.config主機服務。我可以遇到這個問題,因爲我沒有mex端點嗎?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="my.Indexer" behaviorConfiguration="IndexerServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://hostmachine:8000/Indexer"/>
</baseAddresses>
</host>
<endpoint address="net.tcp://hostmachine:9000/Indexer"
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="my.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>
很高興知道 - 謝謝。 我現在將留下問題,看看其他人是否可以對我爲什麼仍然無法調試...... – Matt 2009-08-28 18:39:42