日期:2014-05-19  浏览次数:20625 次

如何在程序出错时自动跳转到自定义的错误处理页面
在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 " .../>