Search code examples
c#asp.netasp.net-mvc-3application-start

Application_Start is invoked frequently,


I had an issue that my Cache is being removed then added frequently, (i add it in the Application_Start) after some debugging i found that the method Application_Start is invoked almost every 10-20 mins, it seems like my application is being terminating frequently. Can anyone just give me a hint what could be the reason ?

please ask for any missing information


Solution

  • Find your application pool associated with your website and your idle-timeout in your application pool and increase it if you don't want the Application_Start to fire every 20 mins (default). Check out the below screenshot and change the idle-timeout.

    enter image description here