【发布时间】: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