偷懒,直接用了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 BuildProviderAppliesToAt
于是在web.config的compilation中增加以下配置:
<buildProviders>
</buildProviders>
问题解决!
本文解决了一个在使用Microsoft的UrlRewriting时出现的服务器错误问题,通过在web.config的compilation中增加相应的配置解决了.htm作为映射后的访问错误。

1841

被折叠的 条评论
为什么被折叠?



