Unrecognized attribute targetFramework

Problem

You get the following error when running your deployed application:

Server Error in '/MyApp4deploy' 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'...

This error usually occurs because you are trying to run an application targeted at the Microsoft .NET Framework 4.0 in an application pool which is not configured with the 4.0 framework.

Solution

In Microsoft IIS Manager, switch the application to an application pool which is configured to use the Microsoft .NET 4.0 Framework.

See Also

Part VII:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages