日期:2014-05-17  浏览次数:20517 次

关于伪静态化‘没有为扩展名“.html”注册的生成提供程序’
我用urlrewrite实现伪静态化的时候就报下面的错误


没有为扩展名“.html”注册的生成提供程序。可以在 machine.config 或 web.config 中的 <compilation><buildProviders> 节注册一个。请确保所注册的提供程序具有包含值“Web”或“All”的 BuildProviderAppliesToAttribute 属性。 


在网上找了很多都是让我添加
<buildProviders>  

 <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />  
 <add extension=".xml" type="System.Web.Compilation.PageBuildProvider" />  

</buildProviders>
这个字节
但是这个字节在08里面可以识别在05里识别不了啊~~
哪位大侠有解决方案告诉下啊,在线等结贴!~~~

------解决方案--------------------
在web.config中,
要注册html的httphandler处理程序
<system.web>
<httpHandlers>
<add verb="*" path="*.html" type="你所使用的静态处理类" />
</httpHandlers>
</system.web>
------解决方案--------------------
<httpHandlers>

<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>