繁体   English   中英

防止在 Identity .Net Core 中每 5 分钟自动注销一次

[英]Prevent Auto Logout Every 5 Minutes in Identity .Net Core

如何防止我的 .Net Core 2.1 应用程序注销? 在我的启动文件中,我有这个配置,但它不起作用。

services.ConfigureApplicationCookie (options =>
{
    // Cookie settings
    options.Cookie.HttpOnly = true;
    options.ExpireTimeSpan = TimeSpan.FromDays (30);
    options.LoginPath = "/Identity/Account/Login";
    options.AccessDeniedPath = "/Identity/Account/AccessDenied";
    options.SlidingExpiration = true;
});

你可以使用 session 和 IdlTimeout

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM