public class HttpModule:IHttpModule
{
public HttpModule()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
IHttpModule 成员#region IHttpModule 成员
public void Init(System.Web.HttpApplication context)
{
context.BeginRequest += new EventHandler(ReUrl_BeginRequest);
}
public void Dispose(){ // TODO: 添加 HttpModule.Dispose 实现 }
#endregion
/// <summary>
///
/// </summary>
/// <param name="sender">事件的源</param>
/// <param name="e">包含事件数据的 EventArgs</param>
private void ReUrl_BeginRequest(object sender, EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
string x= "";
if(context.Session != null)
{