解决方法:
在web.config 中添加
<httpHandlers>
<add verb= " * " path= " *.html " type= " System.Web.UI.PageHandlerFactory "/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension= " .html " type= " System.Web.Compilation.PageBuildProvider "/>
</buildProviders>
</compilation>
<add verb= " * " path= " *.html " type= " System.Web.UI.PageHandlerFactory "/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension= " .html " type= " System.Web.Compilation.PageBuildProvider "/>
</buildProviders>
</compilation>