none
How to change the 10 minutes timeout?

    Question

  • I am developing client server application with NetTCP binding.
    I need to change the timeout that causes the closing of channel after 10 minutes inactivity.
    I have tried to change the receiveTimeout and the inactivityTimeout in app.config as below,
    I have rebuilt my solution but no change was happened.
    It has the default 10 minutes timeout all the time!
    (I have no explicit code for timeout settings in my application.)

    What could I to do to change the 10 minutes timeout??

     

    Part of client's app.config:
        <system.serviceModel>
            <bindings>
                <netTcpBinding>
                    <binding name="NetTcpBinding_IFrontEndService" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:03: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="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                        <reliableSession ordered="true" inactivityTimeout="00:03:00"
                            enabled="false" />
                        <security mode="Transport">
                            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                            <message clientCredentialType="Windows" />
                        </security>
                    </binding>
                </netTcpBinding>
            </bindings>
            <client>
                <endpoint address="net.tcp://localhost:8731/Design_Time_Addresses/MySrv/FrontEndService/"
                    binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IFrontEndService"
                    contract="MysrvPokus.IFrontEndService" name="NetTcpBinding_IFrontEndService">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>

     

    Part of server app.config:
    <system.serviceModel>
        <services>
          <service behaviorConfiguration="MySrv.FrontEndServiceBehavior"
            name="MySrv.FrontEndService">
            <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
              contract="MySrv.IFrontEndService">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
            <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
              contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:8731/Design_Time_Addresses/MySrv/FrontEndService/" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="MySrv.FrontEndServiceBehavior">
              <serviceMetadata httpGetEnabled="false" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>


    Thank You very much for Your help.

    Michal

    Monday, June 09, 2008 8:50 AM

Answers

  • Hi murbicz,

     I think you have to set the configuration properties both in the client & service configuration, i.e. the binding configuration should be indentical. If you don't change it on the service-side, it will still be 00:10:00 .

     Good luck,

     --larsw
    Monday, June 09, 2008 9:17 AM
  • Hi again,

     Yes, you are correct. Copy the relevant binding configuration block over to your service's app.config (it has to reside in the same structure <system.serviceModel><behaviors> ... ).

    You will also have to update the corresponding endpoint's bindingConfiguration="" attribute with the name of the binding (the name attribute from the binding configuration).

     Good luck,

     --larsw
    Monday, June 09, 2008 9:36 AM

All replies

  • Hi murbicz,

     I think you have to set the configuration properties both in the client & service configuration, i.e. the binding configuration should be indentical. If you don't change it on the service-side, it will still be 00:10:00 .

     Good luck,

     --larsw
    Monday, June 09, 2008 9:17 AM
  • Hi Lars,

     

    thank You for Your answer. Can You tell me where I can set the timeout on the service-side?

    Can I add the binding configuration to app.config on service-side?

    I'm novice in WCF therefore I'm asking.

     

    Thanks,

     

    Michal

     

     

    Monday, June 09, 2008 9:31 AM
  • Hi again,

     Yes, you are correct. Copy the relevant binding configuration block over to your service's app.config (it has to reside in the same structure <system.serviceModel><behaviors> ... ).

    You will also have to update the corresponding endpoint's bindingConfiguration="" attribute with the name of the binding (the name attribute from the binding configuration).

     Good luck,

     --larsw
    Monday, June 09, 2008 9:36 AM
  • Hi Lars,

     

    it works now ! It seems that the service's timeout setting is important.

    The change of receiveTimeout value on service side make change of timeout in practice.

     

    Thank You very much for Your help !

     

    Best regards,

    Michal

     

     

     

    Monday, June 09, 2008 11:33 AM
  • Good to know :-)

     Please mark the answer as Answered to mark this thread as closed.

     --larsw
    Monday, June 09, 2008 12:30 PM