0
services.AddSession(options =>
{
  options.Cookie.HttpOnly = true;
  options.Cookie.MaxAge = TimeSpan.FromDays(365) <--- 1 year;
  options.Cookie.IsEssential = true;
});

app.UseSession();

in Startup.cs

enter image description here

But, after 30 minutes it will be empty.

0 Answers0