services.AddSession(options =>
{
options.Cookie.HttpOnly = true;
options.Cookie.MaxAge = TimeSpan.FromDays(365) <--- 1 year;
options.Cookie.IsEssential = true;
});
app.UseSession();
in Startup.cs
But, after 30 minutes it will be empty.
services.AddSession(options =>
{
options.Cookie.HttpOnly = true;
options.Cookie.MaxAge = TimeSpan.FromDays(365) <--- 1 year;
options.Cookie.IsEssential = true;
});
app.UseSession();
in Startup.cs
But, after 30 minutes it will be empty.