0
votes

I am doing some support on a pretty big project. My assignment is to change the session timeout to something longer then what it is now. Right now they are logged off after about 10 min or so. I have found a lot of different things that it could be and i need some help figuring out what they all do.

first of all i got this one:

 <sessionState mode="InProc" timeout="240" cookieless="UseCookies" />

This is triggerd after 240 mins so it can't be this one. Then i got this:

  <binding name="WSHttpBinding_IFootprintService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:00:01" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <reliableSession ordered="true" inactivityTimeout="00:00:01" enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
      </security>
    </binding>
    <binding name="AdministrationEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:00:01" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <reliableSession ordered="true" inactivityTimeout="00:00:01" enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
      </security>
    </binding>
    <binding name="ProductionEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:00:01" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <reliableSession ordered="true" inactivityTimeout="00:00:01" enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
      </security>

In that code there is a lot of different things that i could be. And i just can't figure out what the difference is between closeTimeout, openTimeout, receiveTimeout, sendTimeout, inactivitytimeout and sessionstate timeout?

2

2 Answers

1
votes

Borrowing the response by @marc_s in this question

The most important is the sendTimeout, which says how long the client will wait for a response from your WCF service. You can specify hours:minutes:seconds in your settings - in my sample, I set the timeout to 25 minutes.

The openTimeout as the name implies is the amount of time you're willing to wait when you open the connection to your WCF service. Similarly, the closeTimeout is the amount of time when you close the connection (dispose the client proxy) that you'll wait before an exception is thrown.

The receiveTimeout is a bit like a mirror for the sendTimeout - while the sendTimeout is the amount of time you'll wait for a response from the server, the receiveTimeout is the amount of time you'll give you client to receive and process the response from the server.

In case you're send back and forth "normal" messages, both can be pretty short - especially the receiveTimeout, since receiving a SOAP message, decrypting, checking and deserializing it should take almost no time. The story is different with streaming - in that case, you might need more time on the client to actually complete the "download" of the stream you get back from the server.

Hope it helps,

1
votes

Hope this site helps you a bit http://msdn.microsoft.com/en-us/library/hh924831(v=vs.110).aspx Quick summary about timeouts:

On the client side:
SendTimeout – used to initialize the OperationTimeout, which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

OpenTimeout – used when opening channels when no explicit timeout value is specified

CloseTimeout – used when closing channels when no explicit timeout value is specified

ReceiveTimeout – is not used Client-side Timeouts

On the service side:
SendTimeout, OpentTimeout, CloseTimeout are the same as on the client

ReceiveTimeout – used by the Service Framework Layer to initialize the session-idle timeout which controls how long a session can be idle before timing out.

Also see this post about WCF session timeout WCF Session Timeout