2011-05-18 108 views
8

我們必須使用通過NetTcpBinding的一體機在哪裏都發布服務和訂閱服務正在於我們​​得到了一個控制檯應用程序託管可靠的會話一個WCF的pub/sub設置關閉以上錯誤。這臺機器在一個工作組中。我們在其他地方部署了該機器在一個域中並且工作正常。我對wcf的瞭解有限,並且剛剛交給我,所以請耐心等待。有沒有人有任何建議如何解決這個錯誤?一個現有的連接被強行到遠程主機,WCF

完整的例外是下面:

System.ServiceModel.CommunicationException 套接字連接被中止。這可能是由處理您的消息時出錯或遠程主機超出接收超時或基礎網絡資源問題引起的。本地套接字超時爲'10675199.02:48:05.4775807'。
在System.ServiceModel.Channels.SocketConnection.EndRead() 在System.ServiceModel.Channels.DelegatingConnection.EndRead() 在System.ServiceModel.Channels.TracingConnection.EndRead() 在System.ServiceModel.Channels.ConnectionStream。 ReadAsyncResult.HandleRead() 在System.ServiceModel.Channels.ConnectionStream.ReadAsyncResult.OnAsyncReadComplete(對象狀態) 在System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback() 在System.ServiceModel.Channels.SocketConnection.FinishRead() 在System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(布爾haveResult,的Int32錯誤,的Int32 bytesRead) 在System.ServiceModel.Diagnostics.Utility.IOCompletio nThunk.UnhandledExceptionFrame(UInt32的誤差,UInt32的bytesRead,NativeOverlapped * nativeOverlapped) 在System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32的的errorCode,UInt32的的numBytes,NativeOverlapped * pOVERLAP) 內部異常:
System.Net.Sockets.SocketException
的現有連接被強行關閉遠程主機
在System.ServiceModel.Channels.SocketConnection.EndRead() 在System.ServiceModel.Channels.DelegatingConnection.EndRead() 在System.ServiceModel.Channels.TracingConnection.EndRead() 在System.ServiceMo System.ServiceModel.Channels.ConnectionStream.ReadAsyncResult.HandleRead() del.Channels.ConnectionStream.ReadAsyncResult.OnAsyncReadComplete在System.ServiceModel.Channels.SocketConnection(對象狀態) 在System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback() 在System.ServiceModel.Channels.SocketConnection.FinishRead() .AsyncReadCallback(布爾haveResult,的Int32錯誤,的Int32 bytesRead) 在System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32的誤差,UInt32的bytesRead,NativeOverlapped * nativeOverlapped) 在System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32的的errorCode,UInt32的numBytes,NativeOverlapped * pOVERLAP)

我的綁定配置對如下:

<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> 

端點是:

<endpoint address="net.tcp://localhost:8000/SubscriptionService" 
      binding="netTcpBinding" 
      bindingConfiguration="NetTcpBinding_ISubscriptionService" 
      contract="SubscriptionService.ISubscriptionService" 
      name="NetTcpBinding_ISubscriptionService" /> 
+0

通訊的另一端發生了某種情況,因此您應該啓用跟蹤(可能在客戶端和服務器上)以查看是否存在解釋問題的異常。 http://msdn.microsoft.com/en-us/library/ms733025.aspx – carlosfigueira 2011-05-18 13:46:22

回答

3

好吧,我發現我的問題是什麼。

客戶端應用程序被連接到了10 mxConnection服務。我們也使用SecureMessaging,並有一個listenBacklog爲1.修正maxConnections爲100和listBacklog爲200,它都可以正常工作。

2

對我來說,問題是我沒有正確的服務參考(從開發機器到生產機器)。

+0

我也是。尷尬,呵? :) – Kyle 2012-02-21 18:55:50

相關問題