title: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive
body: <p>I have just uploaded a website to my server. And it works perfectly locally, but after I uploaded, the online version displays this:</p>
  
  <pre>
  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: Unrecognized attribute 'targetFramework'. Note
  that attribute names are case-sensitive.
  
  Source Error: 
  
  
  
  Line 37:     &lt;/buildProviders&gt;
  Line 38:     &lt;/compilation&gt;
  Line 39:     &lt;httpRuntime targetFramework="4.0"
  encoderType="System.Web.Security.AntiXss.AntiXssEncoder, System.Web,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
  Line 40:     &lt;machineKey compatibilityMode="Framework45" /&gt;
  Line 41:  &lt;/system.web&gt;
  
  
   Source File:  D:\HostingSpaces\o\o.com.au\wwwroot\web.config    Line:
  39 
  
  
  --------------------------------------------------------------------------------
  Version Information: Microsoft .NET Framework Version:4.0.30319;
  ASP.NET Version:4.0.30319.272
  </pre>
  
  <p>According to other answers on this site, its because the account on the server is set to use .NET Framework 2.0. BUT that's not the case with mine, I've made sure that it's set to 4.0 and I've even tried 4.0 Integrated. But it still displays this error.</p>
  
  <p>What could be causing this? How can I fix it?</p>
  
  <p><img src="https://i.stack.imgur.com/lEalc.png" alt="enter image description here"></p>