Application_Start ASP.NET

浪子不回头ぞ 提交于 2019-11-29 14:38:47

问题


If get this from the Microsoft official documentation:

The Application_Start and Application_End methods are special methods that do not represent HttpApplication events. ASP.NET calls them once for the lifetime of the application domain, not for each HttpApplication instance.

I was sure that Application_Start was related to the HttpApplication, here this guy explains why I was wrong. Which object/entity is related to the Application_Start event?


回答1:


As the documentation says, the events are linked to the lifetime of the application domain, which in practice means the app pool which the application is running in. Application_Start will fire again if the app pool is recycled for any reason - a change to web.config, for example.



来源:https://stackoverflow.com/questions/7093026/application-start-asp-net

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