【问题标题】:IIS 8.5 Custom 404 not working for extensionless urlsIIS 8.5 自定义 404 不适用于无扩展名 url
【发布时间】:2014-01-06 16:14:14
【问题描述】:

我正在尝试在需要转到 ASPX 页面 (404.aspx) 的 IIS 上设置自定义 404 错误。如果我浏览该站点并转到不存在的 .aspx 页面(例如 /not-here.aspx,则按预期使用自定义 404 页面。但是,如果我转到 /not-here 之类的无扩展 URL,那么我只会得到 IIS 自己的静态内容处理程序提供的默认 404 页面,而不是通过 ASP.NET 提供的 404.aspx

IIS (8.5) 设置为“在此站点上执行 URL”,设置为 /404.aspx

如何让 IIS 使用 404.aspx 处理所有 404 错误?这适用于我们古老的 IIS6 服务器,但我无法让它在 IIS 8.5 上运行

【问题讨论】:

    标签: asp.net iis http-status-code-404 iis-8 custom-error-pages


    【解决方案1】:

    在错误页面功能中,单击编辑功能设置。确保您已选择自定义错误页面作为错误响应。

    【讨论】:

      猜你喜欢
      • 2014-07-26
      • 2013-04-10
      • 2015-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-22
      • 1970-01-01
      • 2016-10-23
      相关资源
      最近更新 更多