1

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.

nima
  • 6,566
  • 4
  • 45
  • 57

1 Answers1

1

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.

Piotr Ratajczak
  • 296
  • 1
  • 3