您的位置:首页 > 其它

关于错误处理的自定义错误页面

2006-09-21 09:40 417 查看
两种方法
一。web.config里写
<customErrors mode="RemoteOnly" defaultRedirect="err.aspx">
<error statusCode="404" redirect="err.aspx" />
</customErrors>
二。global.asax
protected void Application_Error(Object sender, EventArgs e)
{
Response.Redirect("err.aspx");
}
但我现在用那种都没有定位到我的自定义错误页面?
为什么?
err.aspx和web.config,global.asax在相同目录。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: