【发布时间】:2016-10-16 15:14:59
【问题描述】:
我正在执行以下操作:
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="~/Error" responseMode="ExecuteURL" prefixLanguageFilePath="" />
<remove statusCode="500" />
<error statusCode="500" path="~/Error" responseMode="ExecuteURL" prefixLanguageFilePath="" />
</httpErrors>
但是我想删除所有 IIS 错误页面,这样我的内部详细信息就不会暴露在 404、403、500 等处。我尝试使用:
<remove statusCode="*" />
无济于事。这里有标准解决方案吗?
【问题讨论】:
-
尝试将
<clear />作为<httpErrors>的第一个子节点,以删除所有现有的<error>节点。
标签: asp.net-mvc iis web-config