62,074
社区成员
发帖
与我相关
我的任务
分享
protected void Application_Error(object sender, EventArgs e)
{
if (ConfigurationManager.AppSettings["LogSwitch"] == "on")
{
Exception ex = Server.GetLastError();
Exception iex = ex.InnerException;
string URL = Request.RawUrl;
string errormsg = string.Empty;
if (iex != null)
{
errormsg = iex.Message + "-----" + iex.StackTrace;
}
else
{
errormsg = ex.Message + "-----" + ex.StackTrace;
}
Server.Transfer("~/Error.aspx?msg=" + errormsg + "&url="+URL, false);
}
}
protected void Application_Error(object sender, EventArgs e)
{
Response.Redirect("~/error.aspx");
}
你先试试上面的不传msg=" + errormsg + "&url="+URL,报错直接就跳转还会有那个窗口吗?