24

IIS 6 を実行している古い Windows 2003 サーバーがあり、最新の Web アプリケーションに .net 4.5 を選択しました。問題は、サーバー上で実行できないことです...

.NET 4.0 フレームワークがインストールされています。aspnet_regiis を実行して、Web サイトをデプロイしました。私はそれに独自のアプリケーションプールを与えました。しかし、次のエラーが発生します。

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 が必要です...

4

1 に答える 1

39

.Net4.5はWindowsServer2003にインストールできません。

代わりに、.Net4.0でMVC4.0を使用する必要があります。これは正常に機能します。

于 2012-10-10T17:07:44.397 に答える