无法通过ASP.NET管道传递静态文件

无法通过ASP.NET管道传递静态文件,asp.net,sitecore,http-status-code-404,iis-8,Asp.net,Sitecore,Http Status Code 404,Iis 8,我有一个ASP.NET web应用程序(Sitecore),我应该通过ASP.NET处理以.html结尾的路由。通常,正如我所读到的,只需在web.config中的/Configuration/system.WebServer/modules中添加validateIntegratedModeConfiguration=“true”就足够了 然而,我没有看到这种行为 尝试“test.html”会给我默认的IIS404页面,而应该运行的代码不会 应用程序池已处于集成模式,并且属性validateIn

我有一个ASP.NET web应用程序(Sitecore),我应该通过ASP.NET处理以.html结尾的路由。通常,正如我所读到的,只需在web.config中的
/Configuration/system.WebServer/modules
中添加
validateIntegratedModeConfiguration=“true”
就足够了

然而,我没有看到这种行为

尝试“test.html”会给我默认的IIS404页面,而应该运行的代码不会

应用程序池已处于集成模式,并且属性
validateIntegratedModeConfiguration
已设置为
true

我在这里遗漏了什么?

如果您的路线已使用Sitecore管道注册,则您需要在
允许扩展的列表中包含
html
。按如下方式修补配置,以包括需要处理的任何扩展:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
      <preprocessRequest>
        <processor type="Sitecore.Pipelines.PreprocessRequest.FilterUrlExtensions, Sitecore.Kernel">
          <param desc="Allowed extensions (comma separated)">aspx, ashx, asmx, html</param>
        </processor>
      </preprocessRequest>      
    </pipelines>    
  </sitecore>
</configuration>

aspx、ashx、asmx、html

您如何处理您的路线?您是否正在修补Sitecore管道?你能发一些示例代码吗。这可能是因为
html
不是一个。我在showconfig.aspx的输出中搜索了“配置中允许的扩展”,然后在请求管道中找到了相关的处理器。我将html添加到了允许的列表中,并且成功了。如果你把你的评论变成回答,我会接受:)