在Global.asax.cs文件中的Session_Start事件中处理:
protected void Session_Start(Object sender, EventArgs e)
{
string strFile = this.Context.Request.FilePath.ToString();
    string strRoot = Application["RootUrl"].ToString();
if(strFile.Equals("/"+strRoot+"/E.aspx"))
{
this.Response.Redirect("/"+strRoot+"/login.aspx");
}
}