title: Getting Error "The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework"
body: <p>I've published an ASP.NET Web API on IIS7 server. When I'm testing it locally. I get a framework error below:</p>
  
  <blockquote>
    <p>Configuration Error </p>
    
    <p>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. </p>
    
    <p>Parser Error Message: The 'targetFramework' attribute in the
    <code>&lt;compilation&gt;</code> element of the Web.config file is used only to target
    version 4.0 and later of the .NET Framework (for example,
    '<code>&lt;compilation targetFramework="4.0"&gt;</code>'). 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.</p>
    
    <p>Source Error: </p>
    
    <p>Line 20:   <code>&lt;/appSettings&gt;</code><br>
    Line 21:   <code>&lt;system.web&gt;</code><br>
    Line 22:   <code>&lt;compilation targetFramework="4.5" /&gt;</code><br>
    Line 23:   <code>&lt;httpRuntime targetFramework="4.5" /&gt;</code><br>
    Line 24:   <code>&lt;authentication mode="None" /&gt;</code>  </p>
  </blockquote>
  
  <p>I'm not quite sure what it is wrong as I have an ASP.NET website running on the server using framework 4.0. </p>