1、在<system.web>节点下添加:

<!--URL重写文件设置开始-->
        <httpHandlers>
            <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
            <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
        </httpHandlers>
        <!--URL重写文件设置结束-->

2、在<compilation debug="true">节点下添加:

<!--URL重写文件设置开始-->
            <buildProviders>
                <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
            </buildProviders>
            <!--URL重写文件设置结束-->

 

以上两步解决问题,记录一下,以防忘记!

 

相关文章:

  • 2022-01-09
  • 2021-07-28
  • 2021-10-07
  • 2021-10-11
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
猜你喜欢
  • 2021-06-09
  • 2021-08-02
  • 2021-05-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-06-23
相关资源
相似解决方案