正在加载···
AI摘要
HunYuan-Lite

错误信息:

There is no build provider registered for the extension ‘.html’. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value ‘Web’ or ‘All’.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: There is no build provider registered for the extension ‘.html’. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value ‘Web’ or ‘All’.

网页报错截图

解决方案:

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

1
2
3
4
<handlers>
<add name="GreenHandlers" verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add name="MobileHandlers" verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</handlers>

2、在节点下添加:

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