Make a Session never timeout OR redirect user to home page. ASP.NET

别说谁变了你拦得住时间么 提交于 2019-12-24 15:22:49

问题


I am working on a asp.net 3.5 web application the session time-out is set to 24 hours but a recycling of ASPNet process on the server is scheduled to trigger everyday at 3:00 A.M. is causing the session to timed out.

What is the best solution and how to achieve it :

My code should constantly listen to the server and show a message to user and redirect him to home page after session is expired?

OR

A solution which makes a session to never timeout.

Thanks in advance BB


回答1:


Please refer this http://www.primaryobjects.com/CMS/Article86.aspx




回答2:


Make your session be stored in SQL server instead of in-memory. That way when the server recycles it wont affect the sessions at all.



来源:https://stackoverflow.com/questions/6946790/make-a-session-never-timeout-or-redirect-user-to-home-page-asp-net

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