ASP.NET的Application_Start [英] Application_Start ASP.NET

查看:233
本文介绍了ASP.NET的Application_Start的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果从微软官方文档得到这样的:

If get this from the Microsoft official documentation:

在的Application_Start和Application_End方法是特殊的方法不重新present的HttpApplication事件。 ASP.NET称他们一旦应用程序域的生命周期,而不是​​每一个HttpApplication实例。

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.

我肯定是的Application_Start涉及到的HttpApplication,这里这个家伙解释为什么我错了。
哪个对象/实体相关的Application_Start事件?

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?

推荐答案

由于文件说,该事件被链接到的应用领域,这在实践中意味着该应用程序在运行的Application_Start将再次触发如果应用​​程序池被回收以任何理由应用程序池 - 更改web.config中,为例子。

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.

这篇关于ASP.NET的Application_Start的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆