【发布时间】:2017-02-24 12:49:46
【问题描述】:
我有一个部署在 IIS 7 上的 .NET 应用程序。该应用程序应该可以从 IE7 访问。如果发生特殊类型的异常,我会将页面重定向到带有后退按钮的普通 .htm 页面,onclick 应该将用户带回上一页。我在 global.asax 文件中做这个异常处理。下面是我的 Global.asax 代码:
protected void Application_Error(Object sender, EventArgs e)
{
if (GlobalHelper.IsMaxRequestExceededException(this.Server.GetLastError()))
{
this.Server.ClearError();
this.Server.Transfer("Error.htm");
}
}
这是我的.htm 页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
</head>
<body>
<TABLE cellSpacing="1" cellPadding="1" width="100%" border="0" height="100%">
<TR>
<TD height=256 align=center><font color ="red">Exception Occurred !!<br>
Kindly contact your system administrator</font></TD>
</TR>
<TR>
<TD height=41 align =center><button onclick="history.go(-1);" type=button>Back</button></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
</TABLE>
</body>
</html>
现在在上面,.htm 后退按钮单击<TD height=41 align =center><button onclick="history.go(-1);" type=button>Back</button></TD>,我收到“此页面无法显示”消息。
这里有什么问题?
【问题讨论】:
标签: javascript html .net internet-explorer iis