我有以下查询: 在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的吗?
答案 0 :(得分:0)
您可以附加尽可能多的handlers
个活动。有关详细信息,请参阅MSDN
上的Handling events
页。
阅读MSDN - Life Cycle Events and the Global.asax file和ASP.NET Application Life Cycle Overview for IIS 7.0