I am having an issue with a "remember me" style checkbox on an MVC6 project. I had a related question here that solved the issue for debugging on my localhost, however after deploying the project to our dev environment, it still forces me to re-login after 20 minutes.
The 20 minute time span made me think something was mis-configured with IIS. I set my app pool (configured as "no managed code") idle timer to go idle after 1 minute. Sure enough, after 1 minute, I have to re-login again.
This leads me to believe that my persisted authentication cookie is no longer being accepted as valid after an app pool recycle (even though my cookie is configured to not expire to 10 days and the SecurityStampValidationInterval
is set for 10 days and 1 minute.
I've seen something similar in earlier versions of .NET related to a web.config's machine key, but MVC6 doesn't have a system.web
section in the web.config for me to put a machine key.
My .NET5 project DNX is targeting the full .NET framework and not .NET Core.