ASP.NET MVC FormsAuthentication Cookie超时不能增加 [英] ASP.NET MVC FormsAuthentication Cookie timeout cannot be increased
问题描述
使用默认的ASP.NET MVC的模板,我无法弄清楚如何增加FormsAuthentication超时。它似乎一直使用30分钟。
我跟随斯科特谷的从这个博客帖子建议,但它似乎不有所作为。有没有人有一个建议?
他的建议是设置在web.config文件中的超时值:
<&的System.Web GT;
<身份验证模式=表格>
<形式超时=2880/>
< /认证>
< /system.web>
我的问题只在我的生产环境在我的虚拟主机发生。
我发现此链接并生成计算机密钥将在web.config中。一旦我这样做,超时值生效。
Using the default ASP.NET MVC template, I cannot figure out how to increase the FormsAuthentication timeout. It seems to always use 30 minutes.
I have followed Scott Gu's recommendation from this blog post, but it does not seem to make a difference. Does anyone have a suggestion?
His suggestion was to set the timeout value in the web.config file:
<system.web>
<authentication mode="Forms">
<forms timeout="2880"/>
</authentication>
</system.web>
My issue was only occurring in my production environment at my web host.
I found this link and generated a machine key to put in the web.config. Once I did that, the timeout value took effect.
这篇关于ASP.NET MVC FormsAuthentication Cookie超时不能增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!