MADHU@MICROSOFT BLOG

All About Distributed apps

How to change WCF session time out value?

How to change WCF session time out value?

  • Comments 2

You have to increase binding receive timeout, binding receive timeout is responsible for session time out.

Example:

SERVICE CONFIG:

 

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

    <system.serviceModel>

        <bindings>

            <netTcpBinding>

                <binding name="NetTcp_Reliable" receiveTimeout="00:20:00">

                    <reliableSession ordered="false" inactivityTimeout="00:01:00"

                        enabled="true" />

                </binding>

            </netTcpBinding>

        </bindings>

        <behaviors>

            <serviceBehaviors>

                <behavior name="MetadataBehavior">

                    <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:2526/Service" />

                </behavior>

            </serviceBehaviors>

        </behaviors>

        <services>

            <service behaviorConfiguration="MetadataBehavior" name="Service.ServiceImplementation">

                <endpoint address="net.tcp://localhost:2525/Service" binding="netTcpBinding"

                    bindingConfiguration="NetTcp_Reliable" contract="Service.IServiceContract" />

            </service>

        </services>

    </system.serviceModel>

</configuration>


NOTE:

Reliable session inactivity timeout useful when you are not able to send the message because of some network problems, how long we have to retry to send this message.

 

 

 

 

Leave a Comment
  • Please add 2 and 2 and type the answer here:
  • Post
Page 1 of 1 (2 items)