ASP.NET Razor/Webmatrix 站点过快地注销用户。如何改变?
Webmatrix 中的 WebSecurity 组件非常灵活,但用户会话对我来说过期得太快了。似乎是以小时为单位来衡量的,我希望会话超时以天为单位。
如何更改会话超时?
The WebSecurity component in Webmatrix is pretty slick, but users' sessions expire too quickly for me. It seems like it's measured in hours and I'd like the session timeout to be more in terms of days.
How do I change the session timeout?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在回答您的问题时,您可以为 会话超时设置任意值web.config:
默认情况下,会话会在用户最后一次活动后 20 分钟后过期。持续几天的会议似乎很疯狂。我想不出任何合理的理由。您到底想解决什么问题?
In answer to your question, you can set any value for session timeout in your web.config:
By default, sessions expire 20 minutes after the last activity from the user. Having sessions last for days seems insane. There is absolutely no sensible reason that I can think of for that. What problem are you trying to solve, exactly?