I have an ASP.NET 4 application written in c# in visual studio 2010. I start a timer in application_start in Global.asax and I want it to start once but after logging application behavior I have noticed that application_start fires multiple times. Whenever there are no requests on the website for a while, application_start would fire on next request. I am not doing any file operations and not modifying web.config file. Is there a way to prevent this behavior.
After a specified idle time IIS will shutdown application pool worker process. This value is set in advanced settings of application pool- Idle time-out (minutes)
After process is shutdown next request causes application start.