How to upgrade a website to dot NET 4 - Unrecognized attribute ÔÇÿtargetFrameworkÔÇÖ
If you try to run a .NET 4 application (set to .NET 4 in web config) using a .NET 3.5 (or earlier) application pool, you will get the following error:
Unrecognized attribute ‘targetFramework’
To associate an IIS application with the .NET Framework 4 in IIS 7.0
In Windows, start Inetmgr (on Windows 7 click Start and type IIS [enter])
In the Connections pane, expand the server node and then click Application Pools.
On the Application Pools page, select the application pool that contains the application that you want to change.
In the Actions pane, click View Applications.
Select the application whose application pool you want to change and then click Change Application Pool in the Actions pane.
In the Select Application Pool dialog box, select an application pool that is associated with .NET Framework version 4 from the Application pool list, and then click OK.
To associate an IIS application with the .NET Framework 4 in IIS 6.0
Register a scriptmap for the application that associates it with the .NET Framework version that you want to run the application under.
For information about how to update scriptmaps for an ASP.NET application, see ASP.NET IIS Registration Tool (Aspnet_regiis.exe). For more information about IIS configuration in IIS 6.0, see Setting Application Mappings in IIS 6.0 (IIS 6.0).
Leave a Comment