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

拥有回忆 提交于 2019-12-04 15:55:51

问题


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?


回答1:


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.




回答2:


I think IIS is the default and if you want to override them, you use web.config:

http://technet.microsoft.com/en-us/library/cc754617%28WS.10%29.aspx

http://en.wikipedia.org/wiki/Web.config



来源:https://stackoverflow.com/questions/6922571/what-is-the-difference-between-web-config-timeout-and-iis-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!