using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
namespace TestWebApplication1
{
public class Global : System.Web.HttpApplication
{
/// <summary>
///请求 ASP.NET 应用程序中第一个资源(如页)时调用。
///在应用程序的生命周期期间仅调用一次 Application_Start 方法
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_Start(object sender, EventArgs e)
{
}
/// <summary>
/// 根据Web.Config初始化所有模块。
/// </summary>
public override void Init()
{
base.Init();
}
/// <summary>
/// BeginRequest 事件发出信号表示创建任何给定的新请求。此事件始终被引发,并且始终是请求处理期间发生的第一个事件。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_BeginRequest(object sender, EventArgs e)
{
//追加头部信息
}
/// <summary>
/// 当安全模块建立用户标识时发生。并验证用户
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_AuthenticationRequest(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增(可以对验证通过的用户产生角色信息2.0新增)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostAuthenticationRequest(object sender, EventArgs e)
{ }
/// <summary>
/// 当安全模块验证用户授权时发生。根据Web.Config配置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_AuthorizeRequest(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostAuthorizeRequest(object sender, EventArgs e)
{ }
/// <summary>
/// HttpModule会建立一个HttpHandler的入口实例,但是此时并没有将控制权交出
/// 为Handler处理做好准备,编译请求页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_ResolveRequestCache(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostResolveRequestCache(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增,当Handler接收到请求时触发
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostMapRequestHandler(object sender, EventArgs e)
{ }
/// <summary>
/// 获取会话状态 此时Session生效
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_AcquireRequestState(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostAcquireRequestState(object sender,EventArgs e)
{}
/// <summary>
/// HttpModule将控制权交给Handler来处理HttpRequest
/// 此方法之后,将会进入具体的页面生命周期
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增,可以调用用户自定义的Handler
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostRequestHandlerExecute(object sender, EventArgs e)
{ }
/// <summary>
/// 在 ASP.NET 执行完所有请求事件处理程序后发生。该事件将使状态模块保存当前状态数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_ReleaseRequestState(object sender, EventArgs e)
{ }
/// <summary>
/// 2.0新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostReleaseRequestState(object sender,EventArgs e)
{}
/// <summary>
/// 将状态的信息数据保存到缓存,以便再次利用
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_UpdateRequestCache(object sender,EventArgs e)
{}
/// <summary>
/// 2.0新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_PostUpdateRequestCache(object sender, EventArgs e)
{ }
/// <summary>
/// 请求结束,HTTP 执行管线链中的最后一个事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_EndRequest(object sender, EventArgs e)
{
//追加尾部信息
}
/// <summary>
/// 在销毁应用程序实例之前调用。可使用此方法手动释放任何非托管资源。有关更多信息,请参见清理非托管资源
/// </summary>
public override void Dispose()
{
base.Dispose();
}
/// <summary>
/// 在卸载应用程序之前对每个应用程序生命周期调用一次。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_End(object sender, EventArgs e)
{
}
}
}