第一步:通过修改Web.Debug.config文件
添加:
<system.web>
<!–
在下例中,“Replace”转换将替换
web.config 文件的整个 <customErrors> 节。
请注意,由于
在 <system.web> 节点下仅有一个 customErrors 节,因此不需要使用“xdt:Locator”特性。
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
第二步:在Web.config文件添加:
<-- <system.web>
</system.web> -->