在开发环境机器上,安装WEB PAGES 后,会在 C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages 的下产生DLL

如何在windows2003(IIS6)下配置IIS,使其支持cshtml

 

其中

Microsoft.Web.Infrastructure.dll
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.Administration.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll

是运行webpage必须的。

另外,web.config里增加

 <compilation targetFramework="4.0">
        <assemblies>
          <add assembly="System.Web.WebPages.Razor" />
        </assemblies>
        <buildProviders>
          <add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor"/>
        </buildProviders>
      </compilation>
      

附件是一个DEMO,演示了IIS6可以运行cshtml


https://files.cnblogs.com/files/mqingqing123/webpagedemo.rar

 

相关文章:

  • 2021-09-04
  • 2021-12-19
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
相关资源
相似解决方案