[Fix]-Unrecognized attribute targetFramework, Note that attribute names are case-sensitive.

Wikitechy | 3963 Views | asp.net | 28 May 2016



Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

When the code runs with visual studio, it works fine. But when the code is uploaded through ftp to the server, it shows error, when executed on the browser as,

Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Even when the <compilation> section in web.config is commented, the error occurs as:

Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Below is the web.config file:

<?xml version="1.0"?>
  For more information on how to configure your ASP.NET application, please visit
    <compilation debug="false" targetFramework="4.0">
        <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions.Design, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>


Go to IIS Manager and select application pools which lists down all available pools used by each and every available website along with their equivalent frameworks and pipelines.

Similarly, the application pool on the hosting server needs to be checked for the target version of the framework. 


Bug Bounty
IOT Hackathon

Join our Community