【问题标题】:Where do I set Response.TrySkipIisCustomErrors?我在哪里设置 Response.TrySkipIisCustomErrors?
【发布时间】:2011-03-09 04:30:18
【问题描述】:

我正在处理自定义 404 页面,并且不断收到来自 IIS7 的 500 错误。在做了一些研究后,我发现我需要设置“Response.TrySkipIisCustomErrors=true;”

我在哪里设置该值?是否可以通过 php 或在 web.config 文件中设置?

我的 404 web.config 代码是:

<customErrors mode="On">   
 <error statusCode="404" redirect="404.html"/>
</customErrors>

【问题讨论】:

    标签: php iis web-config http-status-code-404


    【解决方案1】:

    web 服务器没有运行 apachee,所以 web.config 文件不起作用。必须让服务器管理员配置 IIS。

    【讨论】:

    • Apache 与这个问题有什么关系? Response.TrySkipIisCustomErrors=true;应该在 Page_Load 事件中设置。
    猜你喜欢
    • 2016-08-04
    • 1970-01-01
    • 2016-12-20
    • 2012-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多