错误页定义方法

(1)代码逻辑错误:

默认显示/Views/Shared/Error.cshtml

(2)404 500等错误

<system.web>

<customErrors mode="Off" defaultRedirect="/error.htm"/>

</system.web>

其中error.htm放在iis根目录下

(3)项目名称错误

在IIS中配置

错误页代码:

 

posted @ 2016-10-14 18:02  #天行健#  阅读(229)  评论(0编辑  收藏  举报