0

When I deploy my .NET application (targeting .NET framework 4.5) on IIS I am getting the following error message:

Parser Error Message: The 'targetFramework' attribute in the 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 have tried many solutions, like set the Aplication Pool to run under .NET 4, enable directory browsing, restart IIS and so on, but still receive the same error.

When I deploy the same application on another server with the same IIS setting it works fine. The IIS version on both servers are 7.5.7600.16385.

What am I missing on this server?

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Syed Zia
  • 3
  • 4
  • 1
    It seems that .Net 4.5 isn't installed on problem server. You should check installed versions [link](http://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx) – Dima Korn Dec 16 '14 at 07:11
  • See duplicate and @Dima's remark, you just need to install the proper .NET Framework version on your server. What specific version depends on what is actually in your `` tag. – CodeCaster Dec 16 '14 at 12:35
  • thanks now its working after installation of .net framework 4.5 – Syed Zia Dec 16 '14 at 13:26

0 Answers0