【发布时间】:2014-03-03 11:08:25
【问题描述】:
如何实现自动注销计时器。
所以基本上如果用户在 x 分钟内不活动,他们的会话就结束了?
我试过了:
<system.web>
<sessionState timeout="1"/>
</system.web>
但它似乎不起作用。
这是我启动时的代码:
public void ConfigureAuth(IAppBuilder app)
{
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
}
这说明我正在使用 cookie 身份验证。所以我不知道如果我能做到这意味着什么。
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-5 asp.net-identity owin asp.net-authentication