关于错误处理的自定义错误页面
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在相同目录。
一。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在相同目录。
相关文章推荐
- 自定义错误处理或者错误页面
- 关于web.xml中配置404错误跳转页面 在ie不能显示自定义错误页面的问题
- MVC 自定义异常错误页面处理
- ASPError对象与asp自定义错误处理页面
- spring boot 源码解析14-默认错误页面处理流程, 自定义,及EnableAutoConfigurationImportSelector处理
- ASP.NET全局错误处理和异常日志记录以及IIS配置自定义错误页面
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- asp.net中自定义错误处理页面
- Android WebView自定义处理错误页面显示(404等)
- 关于ASP.NET网站页面级错误的处理
- ASP.NET自定义错误处理页面的添加
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- ASP.NET MVC 3 中,自定义全局的错误处理页面
- 关于web.xml中配置404错误跳转页面 在ie不能显示自定义错误页面的问题
- IIS7.0、IIS7.5、IIS8.0、IIS8.5自定义错误,配置404页面转向处理
- asp.net自定义错误处理页面的几种方法
- asp.net中自定义错误处理页面
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- asp.net自定义错误处理页面的几种方法
- Java web 项目关于错误页面的处理