Url Rewriting后的问题

来源:互联网 发布:企业报销软件 编辑:程序博客网 时间:2024/09/21 11:12
 偷懒,直接用了Microsoft的Url Rewriting。把.htm作为映射后,在正常访问htm页面时出现了错误:
 
   

Server Error in '/' Application.

--------------------------------------------------------------------------------

There is no build provider registered for the extension '.htm'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

于是在web.config的compilation中增加以下配置:

<buildProviders>
  <add extension=".htm" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>

 

问题解决!

原创粉丝点击