18 [Fix]-Unrecognized attribute targetFramework, Note that attribute name - wikitechy.com

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

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

 

Error:

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
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="false" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <httpRuntime/>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
  </system.web>
</configuration>

Fix:

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. 





Workshop

Bug Bounty
Webinar

Join our Community

Advertise
<