Error: Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive.

Share

 

Problem:

I was recently migrating some web apps off an old server onto a newer one.  Both servers were running the same OS (Windows Server 2003) and both had IIS 6.0.  I had a .NET 4.0 web site that when migrated, produced the following error:

Server Error in ‘/’ Application.


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 44:             during development.
Line 45:         -->
Line 46: 		
Line 47: 			
Line 48:

 

Source File: e:websSampleSiteweb.config    Line: 46


Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

I Googled and I even Binged and all the “answers” I found said to change the app pool that the app uses to use .NET Framework 4.0.  Well, in IIS 6.0, setting the .NET framework on an app pool is not even an option.

Solution:image

    1. In your MMC, expand “Services and Applications”, “Internet Information Services (IIS)”, then click on “Web Server Extensions.

 

  • On the right, make sure that “ASP.NET v4.0.30319” is “Allowed”.image

 

Related posts:

Share

Leave a Reply