【发布时间】:2012-10-01 05:45:52
【问题描述】:
我有一台运行 IIS 6 的旧 Windows 2003 服务器,我为我最新的 Web 应用程序选择了 .net 4.5。问题是我无法让它在服务器上运行...
.NET 4.0 框架已安装。我已经运行 aspnet_regiis 并部署了网站。我给了它自己的应用程序池。但我收到以下错误:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
我看到 .NET 4.5 的要求需要 Windows Server 2008 或更高版本,但我看到很多帖子只需要为 MVC4 配置路由,所以这似乎应该是可能的。
那么有什么想法我需要做些什么才能使它起作用?
编辑:奇怪的是我们使用的 ASP.NET Web API 站点运行良好……但这需要 .net 4.5……
【问题讨论】:
-
MVC 4 / Web API 只需要 .NET 4,不需要 .NET 4.5。因此,如果您的应用程序以 .NET 4 为目标,您将能够在必要时一直运行回 XP SP3 / Server 2003。
标签: iis-6 asp.net-mvc-4 windows-server-2003 .net-4.5