I am storing some web site settings for my ASP.NET website in the application state. I have also initialized the state in the Application_Start()
method. Specific users can change these settings, but after a period of time, the settings are reverting back to the values with which they were initialized in the Application_Start()
method, even though the server is constantly running.
Any idea why this is happening? Does the application get shut down if it does not receive any requests for a specific period of time?
Thanks in advance.
Yes, by default the application pool will shut down after a period of inactivity. See Common reasons why your application pool may unexpectedly recycle for more information.
If you need to keep state across application pool recycle events, you should persist your state in a database or in App_Data.