如何删除错误消息 - IIS7 [英] How to remove error messages - IIS7

查看:117
本文介绍了如何删除错误消息 - IIS7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何删除IIS7添加到页面顶部的错误消息。

I'm wondering how to remove the error messages IIS7 adds to the top of the page.

我有自己的500和404错误页面。

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

任何想法?

推荐答案

为防止IIS7劫持您的错误页面,请设置 existingResponse =PassThrough web.config 文件的 httpErrors 部分。例如:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆