簡體   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