HEXAQ : A friendly question - answer site for IT professionals

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


0

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
Â
asked
 


≡ Total 3 Answers

0

Make sure you have installed .net Framework 3.5.

You can download it from here

Â
replied


0

try to put below where you have return

add new attribute targetFramework="3.5"

Â
replied


1

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

Â
replied


Enter your reply here
Answer Preview: