当前位置: 代码迷 >> ASP.NET >> 怎么在程序出错时自动跳转到自定义的异常处理页面
  详细解决方案

怎么在程序出错时自动跳转到自定义的异常处理页面

热度:768   发布时间:2013-02-26 00:00:00.0
如何在程序出错时自动跳转到自定义的错误处理页面
在Web.config中配置如下:
<customErrors   mode= "RemoteOnly "   defaultRedirect= "GenericErrorPage.htm ">
        <error   statusCode= "404 "   redirect= "PageNotFound.aspx "   />
</customErrors>

如果请求一个名为http://localhost/manual/UserInfo.aspx   ,但在IE地址栏中却输入成http://localhost/manual/UserInfo1.aspx。请问如何进行其它设置才能自动跳转到自定义的错误页面呢?

------解决方案--------------------------------------------------------
<customErrors mode= "on " .../>
  相关解决方案