如何删除错误消息 - IIS7 [英] How to remove error messages - IIS7
问题描述
我想知道如何删除 IIS7 添加到页面顶部的错误消息.
我有自己的 500 和 404 错误页面.
不需要错误页面,我已经删除了它们,但我仍然把它放在我的页面顶部:
<块引用>您要查找的资源已被删除、更名或暂时不可用
有什么想法吗?
要防止 IIS7 劫持您的错误页面,请在您的 httpErrors
部分中设置 existingResponse="PassThrough"
您的 web.config
文件.例如:
I'm wondering how to remove the error messages IIS7 adds to the top of the page.
I have my own 500 and 404 error pages served.
Not needing the error pages I have deleted them, but I am still getting this on top of my page:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable
Any ideas?
To prevent IIS7 hijacking your error pages, set existingResponse="PassThrough"
in your httpErrors
section in your web.config
file. For example:
<configuration>
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</configuration>
这篇关于如何删除错误消息 - IIS7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!