Asp.Net (MVC): Which session timeout is what?

前端 未结 1 1561
闹比i
闹比i 2021-01-17 17:14

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

What is the difference between:

  • SessionState Timeout
相关标签:
1条回答
  • 2021-01-17 17:47

    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

    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.

    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.

    Session Time out in IIS 7

    0 讨论(0)
提交回复
热议问题