What is the difference between web.config timeout and IIS timeout?

52,806

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.

Share:
52,806
333Mhz
Author by

333Mhz

Updated on August 03, 2020

Comments

  • 333Mhz
    333Mhz almost 4 years

    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) :

    enter image description here

    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?

  • 333Mhz
    333Mhz almost 13 years
    OK, so they are unrelated, that's really what I wanted to know, thanks.
  • Unbreakable
    Unbreakable over 7 years
    so, where to put above line of code in config file. Web.config file is a big file where shall I add this piece of code and under which tag?
  • Oded
    Oded over 7 years
  • Palec
    Palec over 5 years
    If I'm not mistaken, usually, this limits element can be used only in applicationHost.config, directly in the sites's definition. Overrides are forbidden by default. <section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />