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>
解决了我的大问题,转一下,备忘.