Asp.Net(MVC):哪个会话超时是什么?

时间:2021-03-08 03:26:53

I've made one Asp.net MVC website, and I'm very confused between the different timeout settings.

我已经创建了一个Asp.net MVC网站,我对不同的超时设置感到很困惑。

What is the difference between:

有什么区别:

  • SessionState Timeout in web.config:
  • web.config中的SessionState超时:

Asp.Net(MVC):哪个会话超时是什么?

  • Application pool timeout
  • 应用程序池超时

Asp.Net(MVC):哪个会话超时是什么?

  • Asp.Net Session timeout property

    Asp.Net会话超时属性

    Asp.Net(MVC):哪个会话超时是什么?

Which one should I set if I want to have a timout of (say) 6 hours? All of them? Only some?

如果我想要(例如)6小时的时间,我应该设置哪一个?他们全部?只有一些?

1 个解决方案

#1


4  

The application pool timeout is the length of time the site has to be idle for before the application pool will shut down the worker process to release resources. The downside is that when the next visitor comes to the website it takes a long time to restart things so that first request after a shutdown will be quite slow. IIS7 Application Pool Idle Time-out Settings

应用程序池超时是在应用程序池关闭工作进程以释放资源之前,站点必须处于空闲状态的时间长度。缺点是,当下一个访问者访问网站时,需要很长时间才能重新启动,因此关闭后的第一个请求将非常缓慢。 IIS7应用程序池空闲超时设置

The session timeout refers to the session id that a user gets on first request to the site, and when that expires. I think the ASP one that you've included the screenshot of is for classic ASP, not ASP.NET.

会话超时是指用户首次请求站点时获取的会话ID,以及何时到期。我认为你包含截图的ASP是经典ASP,而不是ASP.NET。

So to increase the session timeout you would use the one in the config file.

因此,要增加会话超时,您将使用配置文件中的那个。

There's also a Session state section when you click on the website in IIS that you could possibly use either and there's a timeout at the bottom of the page for it.
But if the value for the application pool timeout is shorter, then your session setting will be irrelevant as the worker process will shut down before the session expires. So you should also change your application pool settings.

当您单击IIS中可能使用的网站时,还有一个会话状态部分,并且页面底部有超时。但是,如果应用程序池超时的值较短,则会话设置将无关紧要,因为工作进程将在会话到期之前关闭。因此,您还应该更改应用程序池设置。

Session Time out in IIS 7

IIS 7中的会话超时

#1


4  

The application pool timeout is the length of time the site has to be idle for before the application pool will shut down the worker process to release resources. The downside is that when the next visitor comes to the website it takes a long time to restart things so that first request after a shutdown will be quite slow. IIS7 Application Pool Idle Time-out Settings

应用程序池超时是在应用程序池关闭工作进程以释放资源之前,站点必须处于空闲状态的时间长度。缺点是,当下一个访问者访问网站时,需要很长时间才能重新启动,因此关闭后的第一个请求将非常缓慢。 IIS7应用程序池空闲超时设置

The session timeout refers to the session id that a user gets on first request to the site, and when that expires. I think the ASP one that you've included the screenshot of is for classic ASP, not ASP.NET.

会话超时是指用户首次请求站点时获取的会话ID,以及何时到期。我认为你包含截图的ASP是经典ASP,而不是ASP.NET。

So to increase the session timeout you would use the one in the config file.

因此,要增加会话超时,您将使用配置文件中的那个。

There's also a Session state section when you click on the website in IIS that you could possibly use either and there's a timeout at the bottom of the page for it.
But if the value for the application pool timeout is shorter, then your session setting will be irrelevant as the worker process will shut down before the session expires. So you should also change your application pool settings.

当您单击IIS中可能使用的网站时,还有一个会话状态部分,并且页面底部有超时。但是,如果应用程序池超时的值较短,则会话设置将无关紧要,因为工作进程将在会话到期之前关闭。因此,您还应该更改应用程序池设置。

Session Time out in IIS 7

IIS 7中的会话超时