I recently had to move a .NET application directory to a new location on an IIS 6 server. When I did, of course everything broke. Among the errors that had to be fixed was this one:

Unrecognized attribute 'targetFramework'.

This is usually because the application pool is not set to use the framework assigned to the application in IIS Manager.

There are several ways to fix this. I chose the easiest one: setting the application extension path to the correct executable.

Thanks to “jambot” on the .NET forums for this list of steps

Make sure the correct .NET framework is installed on the server

Under “web service extensions in IIS 6, the correct version of .NET must be added and allowed.


In IIS Manager, create a new application pool for .NET 4.

In IIS Manager, right click on the application’s virtual directory and select the .NET 4 application pool.

Click configuration and go to the mappings tab.

Set the path to the correct .NET executable for the extensions you want to use. (e.g. C:winntmicrosoft.netframeworkv4.0.30319aspnet_isapi.dll)

Screen shot 2013-06-18 at 5.07.47 PM.jpg

Screen shot 2013-05-07 at 11.33.00 AM.jpg