2012-11-24 22 views
6

IIS7サーバーにASP.NET Web APIを公開しました。私はそれをローカルでテストしています。私はASP.NETのウェブサイトはフレームワーク4.0を使用して、サーバー上で実行しているとして、それは間違っているものをかなりよく分からないASP.NET Web API Framework 4.5エラーIIS7

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: 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.

Source Error:

Line 20: </appSettings>
Line 21: <system.web>
Line 22: <compilation targetFramework="4.5" />
Line 23: <httpRuntime targetFramework="4.5" />
Line 24: <authentication mode="None" />

:私は、以下のフレームワークのエラーを取得します。

+15

エラーが無地であります英語。Webサイトが稼働しているサーバーに.NET 4.5をインストールする必要があります。 –

+0

@cloudviz少し遅れますが、答えを受け入れることを自由に感じてください。質問には受け入れられた回答があることが良いので、同じ問題を抱えている人はコメントを見る必要はありません。 :) – Nicholas

答えて

0

Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.

Webサイトを実行しているサーバーに.NET 4.5をインストールする必要があります。

0

またはアプリケーションフレームワークを4.5から4.0に変更することができます。これは、project >> Properties >> Target Frameworkを右クリックして行うことができます。

0

ダウンロードhere から.NET 4.5(管理者など)インストールの実行コマンドプロンプトに成功した後、このアドレスにロケート:

%windir%\Microsoft.NET\Framework\v4.0.30319

は今、次のコマンドを実行します。

aspnet_regiis -iru