【发布时间】:2017-02-18 18:53:21
【问题描述】:
我有一个 ASP.NET Web 应用程序 (Sitecore),我应该通过 ASP.NET 处理以 .html 结尾的路由。通常,正如我所读到的,只需在 web.config 中的 /Configuration/system.WebServer/modules 中添加 validateIntegratedModeConfiguration="true" 就足够了。
但是,我没有看到这种行为。
尝试“test.html”会给我默认的 IIS 404 页面,而应该运行的代码却没有。
应用程序池已处于集成模式,属性 validateIntegratedModeConfiguration 已设置为 true。
我在这里错过了什么?
【问题讨论】:
-
你是如何处理你的路由的?您是否正在修补 Sitecore 管道?您能否发布一些示例代码。这可能是因为
html不是Allowed Extension in config。 -
“配置中允许的扩展”让我在 showconfig.aspx 的输出中进行搜索,并在 PreProcessRequest 管道中找到了相关的处理器。我将 html 添加到允许的列表中并且它有效。如果您将您的评论变成答案,我会接受它:)
标签: asp.net sitecore http-status-code-404 iis-8