Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
I'm trying to access the website on my machine (running XP version 2002 SP3, IIS 5.1, with vs 2008 and I have installed dotnetframework 4.0) but I keep getting the following error:
 
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive
 
Line 33: roleManager
Line 34: compilation debug="true" strict="false" explicit="true" targetFramework="4.0"
Line 35: assemblies
Line 36: add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
assemblies
compilation

I've googled and attempted the various given solutions, i.e. run the command aspnet_regiis.exe -i and changed the version 4.0.30319 on iis manager
 
Any help would be massive!
Posted 10-Nov-11 2:59am
Edited 10-Nov-11 20:33pm
v3
Comments
AmolPandurangBorkar at 10-Nov-11 23:59pm
   
Have you got any solution or not ??
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This code is working fine
 
<compilation debug="true" targetframework="4.0"></compilation>
 
Compare your one with this
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Check the .NET version of Application pool in IIS. If application pool is running on .NET version 2 and the web.Config file specify .Net version 4, you get this error.
Note this may not be the only cause for your error. But check this.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Is .NET framework 4.0 installed on the server?
 
Did you create an application pool that uses .NET 4.0, and assign that app pool to your application?
 
BTW, how can you be targeting .Net 4 whith VS2008 when VS2008 doesn't support .Net 4?
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

To resolve the problem simply go to the ASP.NET Version page in Control Panel to switch the framework to 4.0.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

in menu
 
Website -> Start Options -> build tab – > Select Target Framework in combo box (.NET FrameWork 4)
 
By Elaiyaraja.R
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 275
1 DamithSL 265
2 CPallini 235
3 Maciej Los 185
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 21 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100