简体   繁体   English

如何在IIS6上运行.NET 4.5网站?

[英]How can you get a .NET 4.5 website to run on IIS6?

I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. 我有一台运行IIS 6的旧Windows 2003服务器,我选择.net 4.5作为我最新的网络应用程序。 Problem is I can't get it to run on the server... 问题是我无法让它在服务器上运行...

.NET 4.0 framework is installed. 安装了.NET 4.0框架。 I've run aspnet_regiis and deployed the website. 我运行了aspnet_regiis并部署了网站。 I gave it it's own application pool. 我给它自己的应用程序池。 But I'm getting the following error: 但是我收到以下错误:

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.

I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible. 我看到.NET 4.5的要求需要Windows Server 2008或更高版本,但是我看到很多人只需要为MVC4配置路由,所以看起来这应该是可能的。

So any ideas what I need to do in order for this to work? 所以我需要做些什么才能让它发挥作用?

EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5... 编辑:奇怪的是我们正在使用一个工作得很好的ASP.NET Web API站点......但这应该需要.net 4.5 ......

.Net 4.5 cannot be installed on Windows Server 2003. .Net 4.5无法安装在Windows Server 2003上。

Instead, you should use MVC 4.0 on .Net 4.0, which will work fine. 相反,你应该在.Net 4.0上使用MVC 4.0,这将工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM