Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application_Start() gets called more than once

I have an application made on asp.net MVC 2 and it is on IIS 7.5 on my pc I tried profiling it and I noticed that Application_Start gets called more than once,
does anybody knows why is this happening ?

like image 494
Omu Avatar asked Jun 09 '10 06:06

Omu


1 Answers

The Application_Start event is fired once when the application domain is loaded. If you see it firing more than once then this would mean that the application restarts. There are multiple reasons an application domain could get unloaded like deleting modifying some of the files like web.config, the bin folder, ... Here's an article describing common reasons for application restart.

like image 71
Darin Dimitrov Avatar answered Nov 07 '22 05:11

Darin Dimitrov