0
zepan created
How to set Session expire time.If the user does not have any action for 2 hours, the user will exit the login status.Thanks.
3 Answer(s)
-
0
Hi,
If you are using ASP.NET Core, then it is something like this:
services.AddSession(options => { options.IdleTimeout = TimeSpan.FromMinutes(1); });
If it is MVC 5.x, then <a class="postlink" href="https://stackoverflow.com/questions/22365836/mvc-5-session-timeout-after-default-period-20-mins">https://stackoverflow.com/questions/223 ... od-20-mins</a>.
-
0
Sorry,I use .net Framew 4.6.1.Thanks.
-
0
.NET Framework 4.6.1 on ASP.NET Core or MVC 5.x?
Answers were given for both.