Hi,
I would like to increase the session timeout from 20 minutes to 4 hours.
To achieve this, in the ConfigureService of startup.cs, I have the following code
services.AddAuthentication("SampleAuth")
.AddCookie("SampleAuth", config =>
{
config.Cookie.Name = "Sample.Cookie";
config.LoginPath = "/Login/Index";
config.AccessDeniedPath = "/Login/Unauthorized";
config.ExpireTimeSpan = TimeSpan.FromMinutes(240);
config.SlidingExpiration = true;
});
services.AddSession(options => { options.IdleTimeout = TimeSpan.FromMinutes(240); });
In Configure method, I have app.UseSession();
Also, in the IIS, I have increased the session timeout to 4 hours.
However, the session still timeout after 20 mins.
Can you please let me know what else I am missing?
Thank you.