我有一台运行 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......
最佳答案
.Net 4.5 无法安装在 Windows Server 2003 上。
相反,您应该在 .Net 4.0 上使用 MVC 4.0,它可以正常工作。
关于iis-6 - 如何让 .NET 4.5 网站在 IIS6 上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12824695/