我正在尝试将网页添加到已经放在IIS 7.5上的网站上。我搜索了一个试图改变.config文件,添加dll文件的解决方案。当我将它作为自己的网站运行时,网页运行正常,但是当我在已经建立的网站上设置自己的网址时会产生错误。
这是错误:
"The value for the 'compilerVersion' attribute in the provider options must be 'v4.0'
or later if you are compiling for version 4.0 or later of the .NET Framework. To
compile this Web application for version 3.5 or earlier of the .NET Framework,
remove the 'targetFramework' attribute from the <compilation> element of the
Web.config file. 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.Configuration.ConfigurationErrorsException: The value for
the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if
you are compiling for version 4.0 or later of the .NET Framework. To compile this
Web application for version 3.5 or earlier of the .NET Framework, remove the
'targetFramework' attribute from the <compilation> element of the Web.config file."
答案 0 :(得分:0)
CSHTML文件可以在DNN的Razor主机模块中使用。您需要将该CSHTML文件添加到模块中以在DNN中显示它。
话虽如此,你确定这是你真正想做的吗?