What is the difference between the following entry in web.config:
<sessionState timeout="30"/>
And this setting in IIS 7.5 (Default web site > Advanced Settings > Connection Limits) :
I know that the web.config is supposed to apply to the time that the ASP.NET session is kept alive, but what is the IIS setting for?
The ConnectionTimeout property specifies the amount of time (in seconds) that the server waits before disconnecting an inactive connection. Specify a value between 1 and 65535 (0xffff). If a value outside of this range is specified, IIS uses the default of 120 seconds.
The timeout attribute specifies the number of minutes a session can be idle before it is abandoned. The default value for this attribute is 20. By assigning a value of 1 to this attribute, you've set the session to be abandoned in 1 minute after its idle.
Expand the local computer node, expand "Web Sites", right-click the appropriate website, point to "Manage Web Site", click Advanced Settings. 3.In the Advanced Settings window, expand Connection Limits, change the value in the "Connection time-out" field, and then click OK.
Adjustments to ASP.Net configuration Increase the timeout span for your web application. Add or edit the executionTimeout attribute, giving it a higher value. The default value is 110 seconds and the maximum value is 999999 seconds.
The connection timeout is how long a connection from a browser to the server should take till it times out. So, when the browser requests a page/image/resource, how long should IIS wait till it terminates the connection. It is stated in seconds.
It can also be set in the web.config
(example is for 2 minutes, 120 seconds):
<limits connectionTimeout="00:02:00" />
The session timeout is how long the session can live. This is across multiple connections and is stated in minutes.
They are two different settings that control different things.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With