的idleTimeout和ShutdownTimeout的区别区别、idleTimeout、ShutdownTimeout

由网友(丘比特的悲哀)分享简介:我想放松一下我的网站的会话过期策略,使用户可以指定会话超时时间间隔。I am trying to relax my website's session expiration policy so that the users may specify the session timeout interval.我需要找出...

我想放松一下我的网站的会话过期策略,使用户可以指定会话超时时间间隔。

I am trying to relax my website's session expiration policy so that the users may specify the session timeout interval.

我需要找出相关的设置,我应该为了不限制用户过多指定哪些网站。例如,我们可能需要一个1天的间隔。我将使用的门票来实现这一目标。

I need to figure out what website related settings should I specify in order not to limit the users too much. For example, one might want a 1 day interval. I will be using tickets to accomplish that.

现在,我知道我可以在我的网站的web.config文件(我preFER这种方法,因为它是该死容易不经过整个部署的麻烦来进行调整)指定的idleTimeout和shutdownTimeout。

Now, I know I can specify the idleTimeout and shutdownTimeout in my website's web.config file (I prefer this method as it's damn easy to adjust it without the whole deployment hassle after).

据这里找到MS规格:http://msdn.microsoft.com/en-us/library/system.web.configuration.hostingenvironmentsection.aspx看来我同时设置的idleTimeout和shutdownTimeout值。

According to MS specs found here: http://msdn.microsoft.com/en-us/library/system.web.configuration.hostingenvironmentsection.aspx it seems I have to set both idleTimeout and shutdownTimeout values.

的idleTimeout =获取或设置的时间量,以分钟,卸载不活动的应用程序之前。

idleTimeout = Gets or sets the amount of time, in minutes, before unloading an inactive application.

shutdownTimeout =获取或设置的时间量,以秒为单位,正常关闭的应用程序。

shutdownTimeout = Gets or sets the amount of time, in seconds, to gracefully shut down the application.

不过,我无法弄清楚什么是它们之间的区别。我应该将它们全部无限为用户提供完整的控制权?难道只够设置的idleTimeout?还是只有shutdownTimeout?

But I could not figure out what's the difference between them. Should I set them all to "Infinite" to give users complete control? Is it enough only to set idleTimeout? Or only shutdownTimeout?

最重要的是,是否真的对我的期望的情况下工作?

And most of all, will this really work for my desired scenario?

感谢。

推荐答案

我相信 ShutdownTimeout 指的时间量,以允许进程尝试正常关闭 - 一次过期将被强行杀死。

I believe ShutdownTimeout refers to the amount of time to allow the process to attempt to shutdown gracefully - once that expires it will be killed forcefully.

的IdleTimeout 的空闲时间量,让试图将其关闭之前。

IdleTimeout is the amount of idle time to allow before attempting to shut it down.

阅读全文

相关推荐

最新文章