0

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?

Dalorzo
  • 19,834
  • 7
  • 55
  • 102
Daniel Gustafsson
  • 1,725
  • 7
  • 37
  • 78

2 Answers2

1

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,

Community
  • 1
  • 1
avenet
  • 2,894
  • 1
  • 19
  • 26
  • So non of them makes the User to automatically logg off? I know that this does: But it got to be something else that makes the user logg off :/ Becuase this takes the user 4 hours to logg off? – Daniel Gustafsson Jan 09 '14 at 13:35
  • It should be the inactivityTimeout the one that makes user to log off. – avenet Jan 09 '14 at 13:37
  • It takes more then 1 min for the user to log of. Maybe if sendtimeout is triggerd it triggers the next timeout so that the added timeout of all the timeout is the time it takes for the user to log off? – Daniel Gustafsson Jan 09 '14 at 13:40
  • No, I don't think it works that way, note that all of the timeouts describe independent events. – avenet Jan 09 '14 at 13:44
1

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

Community
  • 1
  • 1
Panu Oksala
  • 3,245
  • 1
  • 18
  • 28