相关疑难解决方法(0)

10分钟后使用netTcp绑定超时的WCF回调服务

我正在使用WCF(使用回调契约)和netTcpBinding创建聊天应用程序.我将该服务作为Windows服务托管,并通过客户端应用程序从其他计算机访问它.

我现在面临的问题是客户端连接在10分钟后进入故障状态,这似乎是某种超时发生.我已经尝试增加收到的超时并在服务和客户端发送超时但不起作用.

应该更改哪个设置以增加此超时期限以及应用程序,服务或客户端?

以下是我的配置文件,

服务

    <system.serviceModel>
    <services>
      <service behaviorConfiguration="PeerTalk.Service.ChatServiceBehavior"
        name="PeerTalk.Service.ChatService">
        <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
          contract="PeerTalk.Service.ServiceContracts.IChat">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:7920/ChatService" />
            <add baseAddress="net.tcp://localhost:7921/ChatService" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="PeerTalk.Service.ChatServiceBehavior">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <netTcpBinding>
        <binding name="tcpBinding"
                 maxBufferSize="67108864"
           maxReceivedMessageSize="67108864"
           maxBufferPoolSize="67108864"
           transferMode="Buffered"
           closeTimeout="00:01:00"
           openTimeout="00:01:00"
           receiveTimeout="00:00:10"
           sendTimeout="00:00:10"
           maxConnections="100">
          <readerQuotas maxDepth="64"
                        maxStringContentLength="67108864"
                        maxArrayLength="67108864"
                        maxBytesPerRead="67108864"
                        maxNameTableCharCount="16384"/>
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows"/>
          </security> …
Run Code Online (Sandbox Code Playgroud)

wcf wcf-callbacks

5
推荐指数
1
解决办法
5447
查看次数

标签 统计

wcf ×1

wcf-callbacks ×1