I create MVC application with .NET Core 8. This application, in production, runs on IIS. I need to force the session timeout to more than 20 minutes.
I tried in this way:
builder.Services.AddSession(options => {
options.IdleTimeout = TimeSpan.FromHours(24);
});
It works correctly outside of IIS, but in IIS it seems that this information are ignored.
To solve this I usually go in IIS Application Pools
, Advanced settings
and, in Process Model
, I change Idle Time-out
setting.
In this case I don’t have access to IIS. It’s possible to force this value from code?