Eine bestehende Verbindung zwangsweise geschlossen durch remote-host mit WCF

Haben wir einen wcf-pub/sub-setup mit zuverlässigen Sitzungen über netTcpBinding und auf einer Maschine, wo sowohl die Publikation service-und Abo-service wird gehostet in einem Konsole-Anwendungen, die wir erhalten den oben genannten Fehler. Diese Maschine ist in einer Arbeitsgruppe. Überall sonst, wir haben implementiert, die Maschine ist in einer Domäne und es funktioniert gut. Meine Kenntnisse in wcf ist etwas beschränkt und diese wurde gerade an mich übergeben, so seien Sie bitte geduldig. Hat jemand einen Rat, wie dieser Fehler behoben werden?

Die volle Ausnahme ist unter:

System.ServiceModel.CommunicationException
Die Socketverbindung wurde abgebrochen. Dies könnte verursacht werden durch einen Fehler bei der Verarbeitung Ihrer Nachricht oder eine receive-timeout überschritten wird, die von dem remote-host, oder einer zugrunde liegenden Netzwerk-Ressourcen-Problem. Lokale socket-timeout-war '10675199.02:48:05.4775807'.

System.ServiceModel.- Kanäle.SocketConnection.EndRead()
System.ServiceModel.- Kanäle.DelegatingConnection.EndRead()
System.ServiceModel.- Kanäle.TracingConnection.EndRead()
System.ServiceModel.- Kanäle.ConnectionStream.ReadAsyncResult.HandleRead()
System.ServiceModel.- Kanäle.ConnectionStream.ReadAsyncResult.OnAsyncReadComplete(Object state)
System.ServiceModel.- Kanäle.TracingConnection.TracingConnectionState.ExecuteCallback()
System.ServiceModel.- Kanäle.SocketConnection.FinishRead()
System.ServiceModel.- Kanäle.SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 Fehler, Int32 bytesRead)
System.ServiceModel.Diagnostik.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32-Fehler, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Innere Ausnahme:

System.Net.Sockets.SocketException

Eine bestehende Verbindung zwangsweise geschlossen durch remote-host

System.ServiceModel.- Kanäle.SocketConnection.EndRead()
System.ServiceModel.- Kanäle.DelegatingConnection.EndRead()
System.ServiceModel.- Kanäle.TracingConnection.EndRead()
System.ServiceModel.- Kanäle.ConnectionStream.ReadAsyncResult.HandleRead()
System.ServiceModel.- Kanäle.ConnectionStream.ReadAsyncResult.OnAsyncReadComplete(Object state)
System.ServiceModel.- Kanäle.TracingConnection.TracingConnectionState.ExecuteCallback()
System.ServiceModel.- Kanäle.SocketConnection.FinishRead()
System.ServiceModel.- Kanäle.SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 Fehler, Int32 bytesRead)
System.ServiceModel.Diagnostik.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32-Fehler, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Meine Bindung Konfiguration ist wie folgt:

<netTcpBinding>
    <binding name="NetTcpBinding_ISubscriptionService"
             closeTimeout="00:01:00"
             openTimeout="00:01:00"
             receiveTimeout="00:10:00"
             sendTimeout="00:01:00"
             transactionFlow="false"
             transferMode="Buffered"
             transactionProtocol="OleTransactions"
             hostNameComparisonMode="StrongWildcard"
             listenBacklog="10"
             maxBufferPoolSize="524288"
             maxBufferSize="65536"
             maxConnections="10"
             maxReceivedMessageSize="65536">
        <readerQuotas maxDepth="32"
                      maxStringContentLength="8192"
                      maxArrayLength="524288"
                      maxBytesPerRead="4096"
                      maxNameTableCharCount="16384" />
        <reliableSession ordered="true"
                         inactivityTimeout="00:10:00"
                         enabled="true"/>
        <security mode="Transport"
                  transport=""
                  clientCredentialType="Windows"
                  protectionLevel="EncryptAndSign"
                  message=""/>
    </binding>
</netTcpBinding>

Den Endpunkt:

<endpoint address="net.tcp://localhost:8000/SubscriptionService"
          binding="netTcpBinding" 
          bindingConfiguration="NetTcpBinding_ISubscriptionService" 
          contract="SubscriptionService.ISubscriptionService" 
          name="NetTcpBinding_ISubscriptionService" />
  • Etwas passiert am anderen Ende der Kommunikation, so sollten Sie die Ablaufverfolgung aktivieren (möglicherweise auf client und server), um zu sehen, wenn es eine Ausnahme, die das problem erläutert. msdn.microsoft.com/en-us/library/ms733025.aspx
InformationsquelleAutor John | 2011-05-18
Schreibe einen Kommentar