Application_Start() gets called more than once

你说的曾经没有我的故事 提交于 2020-01-02 00:52:20

问题


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,
anybody knows why is this happening ?


回答1:


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.



来源:https://stackoverflow.com/questions/3003670/application-start-gets-called-more-than-once

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!