在ASP.NET中注册的HttpApplication事件

时间:2012-07-23 06:39:44

标签: asp.net

我有以下查询: 在ASP.NET Global.ascx文件中定义了HttpApplication事件:

 protected void Application_Start(object sender, EventArgs e)
   {


   }

    protected void Session_Start(object sender, EventArgs e)
    {

    }

    protected void Application_BeginRequest(object sender, EventArgs e)
    {

    }

    protected void Application_AuthenticateRequest(object sender, EventArgs e)
    {

    }

    protected void Application_Error(object sender, EventArgs e)
    {

    }

    protected void Session_End(object sender, EventArgs e)
    {

    }

    protected void Application_End(object sender, EventArgs e)
    {

    }

据我所知,这些是HttpApplication事件处理程序。但是还有很多其他事件。 Global.ascx事件只是注册事件吗?如果没有,那么注册的其他事件是什么? 另外,假设我在实现Application_BeginRequest事件处理程序时实现了HttpModule。现在,ASP.NET Framework也实现了相同的功能。然后我的实现会覆盖Framework的吗?

1 个答案:

答案 0 :(得分:0)

您可以附加尽可能多的handlers个活动。有关详细信息,请参阅MSDN上的Handling events页。

阅读MSDN - Life Cycle Events and the Global.asax fileASP.NET Application Life Cycle Overview for IIS 7.0