using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Web;
|
|
namespace CY.Application
|
{
|
/// <summary>
|
/// 应用程序级请求处理类
|
/// </summary>
|
public class CYHttpModule : IHttpModule
|
{
|
#region IHttpModule 成员
|
|
public void Dispose()
|
{
|
throw new NotImplementedException();
|
}
|
|
/// <summary>
|
/// 连接初始化处理
|
/// </summary>
|
/// <param name="context"></param>
|
public void Init(HttpApplication context)
|
{
|
context.BeginRequest += new EventHandler(this.ReUrl_BeginRequest);
|
context.EndRequest += new EventHandler(this.ReUrl_EndRequest);
|
}
|
|
/// <summary>
|
/// 开始请求处理
|
/// </summary>
|
/// <param name="sender"></param>
|
/// <param name="e"></param>
|
private void ReUrl_BeginRequest(object sender, EventArgs e)
|
{
|
|
}
|
|
/// <summary>
|
/// 结束请求处理
|
/// </summary>
|
/// <param name="sender"></param>
|
/// <param name="e"></param>
|
private void ReUrl_EndRequest(object sender, EventArgs e)
|
{
|
|
}
|
|
#endregion
|
|
/// <summary>
|
/// 应用程序级错误处理
|
/// </summary>
|
/// <param name="sender"></param>
|
/// <param name="e"></param>
|
public void Application_OnError(object sender, EventArgs e)
|
{
|
//HttpApplication application = (HttpApplication)sender;
|
//HttpContext context = application.Context;
|
//context.Response.Write("<html><body style=\"font-size:14px;\">");
|
//context.Response.Write("系统错误:<br />");
|
//context.Response.Write("<textarea name=\"errormessage\" style=\"width:80%; height:200px; word-break:break-all\">");
|
//context.Response.Write(HttpUtility.HtmlEncode(context.Server.GetLastError().ToString()));
|
//context.Response.Write("</textarea>");
|
//context.Response.Write("</body></html>");
|
//context.Response.End();
|
}
|
}
|
}
|