Служба обратного вызова WCF с тайм-аутом привязки netTcp через 10 минут

Я создаю приложение чата с помощью 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>
          <reliableSession enabled="false" inactivityTimeout="00:01:00"/>

        </binding>
      </netTcpBinding>
    </bindings>
  </system.serviceModel>

Клиент

<system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_IChat" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:00:10" transactionFlow="false"
          transferMode="Buffered" transactionProtocol="OleTransactions"
          hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="67108864"
          maxBufferSize="67108864" maxConnections="10" maxReceivedMessageSize="67108864">
          <readerQuotas maxDepth="32" maxStringContentLength="67108864"
            maxArrayLength="67108864" maxBytesPerRead="67108864" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:01:00"
            enabled="false" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <client>     
          <endpoint address="net.tcp://10.10.10.45:7921/ChatService" binding="netTcpBinding"
               bindingConfiguration="NetTcpBinding_IChat" contract="PeerTalkService.IChat"
               name="NetTcpBinding_IChat">
          </endpoint>
    </client>
  </system.serviceModel>

Спасибо.

5
задан user501579 16 April 2012 в 06:25
поделиться