HEXAQ : A friendly question - answer site for IT professionals

Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive


I am a beginner in in ASP.NET programming. I am building my first website using Visual Studio 2010.

I am getting an error message when I try to run my project.

Can anyone help me to get out of the error?

Server Error in '/EricTest/Default_aspx' 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 16: <system.web>
Line 17: <customErrors mode="Off" />
Line 18: <compilation debug="true" targetFramework="3.5" />
Line 19: <httpRuntime maxRequestLength="15360" />
Line 20: <membership>

Source File: D:\inetpub\wwwroot\EricTest\Default_aspx\web.config Line: 18
Version Information: Microsoft .NET Framework Version:2.0.50727.3643; ASP.NET Version:2.0.50727.3634

≡ Total 3 Answers


Make sure you have installed .net Framework 3.5.

You can download it from here



try to put below where you have return

add new attribute targetFramework="3.5"



When you configure you website on IIS, it a an application pool (apppool) attached with.

You are supposed to configure your .NET Framework in your AppPool of each website.

There are two ways to host your site:

  1. When you create any website in development environment, in most of the cases it will be under Default Web Site. AppPool of default website is shared between all websites created under it. When you set target Framework for Default Website, it will be common for all. You can't configure for each.

  2. When you have configured your website as separate website in your IIS, IIS creates a new AppPool for your website. This AppPool is dedicated to your website. Configure the .NET framework for your site in your AppPool.

From your error, the Target .NET Framework required to run your site is 3.5 and at the bottom of the error shows available version .NET Framework Version:2.0.50727.3643;

Go to your AppPool and change the .NET Framework to 3.5

If you don't have .NET Framework 3.5 installed, download and install it from here


Enter your reply here
Answer Preview: