2
私はリモートマシン上でWCFサービスをホストしています。私のローカルマシンには、WPFアプリケーションとWCFサービスに接続できるWindowsサービスがあります。 WPFアプリケーションは接続して正常に通信しますが、何らかの理由でWindowsサービスが接続されません。両方のapp.configファイルは同一であり、接続を行うコードは両方で同じです。 Windowsサービスが接続できない理由はありますか?ソケット接続が中断されましたWindowsサービスからWCFサービスに接続できません
:ここ
は、私が取得しています例外です。これは、メッセージの処理中にエラーが発生したか、リモートホストの または受信したタイムアウト値を超過したために発生した可能性があります。ローカルソケット タイムアウトは'00:01:14.9900000 'でした。
これについての奇妙なことは、タイムアウトが設定されている1:15の後ではなく、5秒以内に例外がスローされることです。ここで
はapp.configをである:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ServiceIP" value="127.0.0.1"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" />
</assemblyBinding>
</runtime>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00"
openTimeout="00:00:10" receiveTimeout="00:10:00" sendTimeout="00:01:15"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost:8731/WCFService/" binding="netTcpBinding"
bindingConfiguration="NetTcpBindingEndpoint" contract="WCFService.IWCFService"
name="NetTcpBindingEndpoint">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="Traces.svclog"/>
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
トレースは、私の知る限り有益な何かを明らかにしていないようです。