There is no build provider registered for the extension '.cshtml'.
2012-07-18 14:20
381 查看
There is no build provider registered for the extension '.cshtml'. 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'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: There is no build provider registered for the extension '.cshtml'. 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 debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35" />
</assemblies>
<buildProviders>
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</buildProviders>
</compilation>
which includes the value 'Web' or 'All'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: There is no build provider registered for the extension '.cshtml'. 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 debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35" />
</assemblies>
<buildProviders>
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</buildProviders>
</compilation>
相关文章推荐
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- Caused by: There is no result type defined for type 'json' mapped with name 'rebback'. Did you mean
- There is no result type defined for type 'json' mapped with name 'success'.
- There is no getter for property named 'xxx' in 'class java.lang.Long'
- 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'
- Struts2 错误:There is no result type defined for type 'json' mapped with name 'success'.
- There is no getter for property named '**' in 'class java.lang.String'
- There is no getter for property named '**' in 'class java.lang.String
- Solution: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
- There is no getter for property named 'xxxx' in 'class java.lang.Integer
- MyBatis There is no getter for property named 'xxx' in 'class java.lang.String'
- 包执行中提示错误:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key ''.
- Mybatis-There is no getter for property named 'tj' in 'class
- HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"
- The 'OraOLEDB.Oracle' provider is not registered on the local machine的原因
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- Excel导入数据库错误:The 'Microsoft.ACE.OLEDB.14.0' provider is not registered on the local machine
- There is no getter for property named 'num' in 'class java.lang.String'。