以及在这种情况下,你必须添加一个HTTP处理程序为Web应用程序(注册在web.config中的模块)
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += new EventHandler(PreRequestHandlerExecute);
}
public void Dispose()
{
}
/// <summary>
/// Pres the request handler execute.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
void PreRequestHandlerExecute(object sender, EventArgs e)
{
if(HttpContext.Current.Request.Path == "/_layouts/Authenticate.aspx")
{
HttpContext.Current.Response.Redirect(url.Replace("/_layouts/Authenticate.aspx", "/HOME_PAGE.aspx"));
}
}