0

我正在尝试将网页添加到已经放在 IIS 7.5 上的网站。我在互联网上搜索试图更改 .config 文件、添加 dll 文件的解决方案。当我将其作为自己的网站运行时,该网页运行良好,但当我在已建立的网站上设置其自己的 url 时会产生错误。

这是错误:

"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."
4

1 回答 1

0

CSHTML 文件可以在 DNN 的 Razor Host 模块中使用。您需要将该 CSHTML 文件添加到模块中以在 DNN 中显示该文件。

话虽如此,你确定这是你真正想做的吗?

于 2013-10-31T21:00:04.110 回答