应用程序在几秒钟内自动注销,我想将它增加到30分钟。如何增加Asp .Net MVC 5中的会话超时时间?
我已经在web.config文件中做了一些代码,但它不起作用。我已经研究了很多文章,但我无法解决它。
的Web.config代码:
<sessionState mode="InProc" timeout="1800"></sessionState>
<authentication mode="Forms">
<forms loginUrl="~/Login" timeout="1800">
</forms>
</authentication>
您显示的配置有效。如果您的会议似乎仍然超时,还有其他事情正在进行。解释你的托管环境是什么样的,展示使用会话的相关代码并解释你所经历的行为。 – CodeCaster