I don\'t know why the Response.Redirect not working properly when I deploy my code to IIS7? The white/yellow error page always get displayed instead of my Errors.aspx. But w
protected void Application_Error(object sender, EventArgs e)
{
Exception objErr = Server.GetLastError().InnerException;
//Logging.WriteToErrorLog("Error Caught in Application_Error event", objErr);
HttpContext.Current.Server.ClearError();
HttpContext.Current.Application.Add("test", objErr);
HttpContext.Current.Response.Redirect("~/Home/Index");
return;
}