我已經在IIS7服務器上發佈了ASP.NET Web API。當我在本地進行測試時。我得到下面的框架錯誤: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" />
我不太清楚什麼是錯的,因爲我有使用框架4.0的服務器上運行的ASP.NET網站。
的錯誤是在平原英語..你需要在網站運行的服務器上安裝.NET 4.5。 –
@cloudviz有點晚了,但可以隨時接受答案。對於有問題的人來說,接受答案是很好的,所以有同樣問題的人不需要看評論。 :) – Nicholas