Windows服务中托管的WCF服务停止响应

时间:2016-08-09 14:28:21

标签: wcf windows-services nettcpbinding

我们的WCF服务使用带端口8090的net tcp绑定托管在Windows服务中。

它在大多数情况下运行良好,但有时客户端应用程序无法连接到服务,即使服务仍在运行且事件日志中没有明显错误。连接时客户端应用程序将获得以下异常:

  

在分配的00:01:00超时内未完成打开操作。分配给此操作的时间可能是较长超时的一部分。

客户端计算机仍然可以ping服务器。

重新启动Windows服务可以解决问题,但用户不喜欢它。

知道这里会发生什么吗?我已经阅读了有关Net TCP Listener服务的信息,并确保服务器已经过修补。但我认为这仅适用于IIS中托管的net tcp绑定,并且在我的情况下可能不适用。

谢谢!

这是服务配置:

<services>
  <service behaviorConfiguration="behavior1" name="Tamer.Service.WcfService">
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint1" contract="Tamer.Service.Library.IFundService" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint2" contract="Tamer.Service.Library.IEntitlementService" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint3" contract="Tamer.Service.Library.IReferenceDataService" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint4" contract="Tamer.Service.Library.ITransactionService" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint4" contract="Tamer.Service.Library.IDocumentService" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint5" contract="Tamer.Service.Library.IFileStreaming" />
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpLarge" name="endpoint6" contract="Tamer.Service.Library.IReportService" />
    <endpoint address="net.tcp://localhost:8091/mex" binding="mexTcpBinding" name="mex" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="behavior1">
      <serviceMetadata policyVersion="Policy15" />
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
      <serviceThrottling maxConcurrentCalls="192"  maxConcurrentSessions="192" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <netTcpBinding>
    <binding name="netTcpLarge" closeTimeout="00:01:00" openTimeout="00:01:00"
      receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferPoolSize="524288"
      maxReceivedMessageSize="2147483647" maxConnections="192" listenBacklog="100">
      <!--listenBacklog="100"-->
      <readerQuotas maxDepth="32"
                          maxStringContentLength="2147483647"
                          maxArrayLength="2147483647"
                          maxBytesPerRead="2147483647"
                          maxNameTableCharCount="2147483647"/>
      <security mode="None">
        <message clientCredentialType="None"/>
        <transport protectionLevel="None" clientCredentialType="None"/>
      </security>
      <!--reliableSession enabled="false"/-->

    </binding>
  </netTcpBinding>
</bindings>

0 个答案:

没有答案