-3

In out ASP.NET MVC application happens, then a user is from time to time logged off unexpectedly (prematurely), after one minutes from recent activity instead of 20 minutes.

What can be the reason?

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
  • 1
    Session timeout is set to one minute may be... – Shiham Oct 13 '16 at 09:02
  • 1
    There's way too much information missing from your question, which indicates a lack of research. What authentication API do you use? Membership? Identity? Some home-grown system? What actually happens when they are logged out, are expected cookies not sent, or something else? Does it happen for one user on one system, or do multiple users on multiple systems encounter this issue? Do you have a web farm? Sticky sessions? Please read [ask] and share your research. – CodeCaster Oct 13 '16 at 09:03
  • The app use Identity. It happens to multiple users across system. No web farm, jsut simple IIS site in VPS hosting. – Tomas Kubes Oct 13 '16 at 09:06
  • 2
    Your ASP .NET identity probably relies on in-process session state management, which resetting its contents everytime the application pool has recycled. It depends on presence of web farm and IIS configuration. – Tetsuya Yamamoto Oct 13 '16 at 09:08
  • Check This: http://stackoverflow.com/a/36440655/3743442 – Hadee Oct 13 '16 at 19:51

1 Answers1

0

The reason was that SlidingExpiration property was set to false in CookieAuthenticationOptions.

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148