使用默认的ASP.NET MVC模板,我无法弄清楚如何增加FormsAuthentication超时。似乎总是要用30分钟。
我遵循了this blog post的Scott Gu的建议,但似乎没有什么不同。有人有建议吗?
他的建议是在web.config文件中设置超时值:
<system.web>
<authentication mode="Forms">
<forms timeout="2880"/>
</authentication>
</system.web>
最佳答案
我的问题仅发生在我的Web主机上的生产环境中。
我找到了this link并生成了一个要放入web.config的机器 key 。一旦执行此操作,超时值即会生效。
关于ASP.NET MVC FormsAuthentication Cookie超时不能增加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1663991/