ASP.NET mvc auth or session expires quicker than set

后端 未结 2 1595
耶瑟儿~
耶瑟儿~ 2021-01-25 06:16

In my ASP.NET MVC5 website the login and session timeout in web.config are as follows:


  
    

        
2条回答
  •  终归单人心
    2021-01-25 06:52

    It was an issue with the SystemIdleTime variable in the IIS. I requested my hosting provider to increase this value to 30 minutes and it worked.

    It indicates that all my session variables would erase as the application pool shuts down when there is no request for 30 minutes. This value would override the session's timeout set in the website's web.cofig. You could set it to 0 to indicate that the application pool will never shut down and then you could sontrol the session's timeout through web.config. I also found this good article –

提交回复
热议问题