Getting the following error when you deploy your first asp.net 4.0 website:
Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive.
is most likely because of either of 2 reasons:
1. You installed the .net 4.0 bits after IIS was set up, resulting in the wrong version of the .NET framework beeing registered with IIS.
Most often the above results in conflicting versions of the framework, and so the easiest way of solving this is to re-register the .NET extensions with IIS using the aspnet_regiss tool. Make sure you run it from an elevated command prompt and that you use
the correct version (in the v4.xx folder that is, not the v2.xx one). On my dev machine this tool is located in:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
and you run it with the -iru flags like so:
aspnet_regiis.exe -iru
2. You haven’t set the framework of the IIS application to the correct version of .NET (4.0 that is)
Change this using either the IIS Manager or the command line. In IIS Manager you select ‘Application Pools’, click the Application you’ve pointed you site to use, select ‘Basic Settings’ in the ‘Actions’ pane and change the ‘.NET framework version’.
This post over at MSDN should also be of great help. Gotta love Microsoft’s documentation!
Just go to your IIS Manger in your local machine, from the left side panel choose application pools and then Double click on DefaultAppPool change the .net framework Version to be v4.030319.
vineeta_2010
Member
149 Points
151 Posts
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 08:14 AM|LINK
I made a site using visual studio 2010. I have uploaded website by using FIlezila on clients server. but when I run web site an error comes.
Unrecognized attribute 'targetFramework'. I am fad up with this error .please please help.I have use c#,sqlserver 2010
Thank you
r.rajeshkhun...
Participant
1358 Points
250 Posts
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 08:29 AM|LINK
It seems like you have not registered .net 4.0 over server with IIS. You can do the same using below command...
======================================
Microsoft® Community Contributor 2011 | AWARD
MCTS
My Blog
Follow Me
r.rajeshkhun...
Participant
1358 Points
250 Posts
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 08:30 AM|LINK
Getting the following error when you deploy your first asp.net 4.0 website:
Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive.
is most likely because of either of 2 reasons:
1. You installed the .net 4.0 bits after IIS was set up, resulting in the wrong version of the .NET framework beeing registered with IIS.
Most often the above results in conflicting versions of the framework, and so the easiest way of solving this is to re-register the .NET extensions with IIS using the aspnet_regiss tool. Make sure you run it from an elevated command prompt and that you use the correct version (in the v4.xx folder that is, not the v2.xx one). On my dev machine this tool is located in:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
and you run it with the -iru flags like so:
aspnet_regiis.exe -iru
2. You haven’t set the framework of the IIS application to the correct version of .NET (4.0 that is)
Change this using either the IIS Manager or the command line. In IIS Manager you select ‘Application Pools’, click the Application you’ve pointed you site to use, select ‘Basic Settings’ in the ‘Actions’ pane and change the ‘.NET framework version’.
This post over at MSDN should also be of great help. Gotta love Microsoft’s documentation!
http://msdn.microsoft.com/en-us/library/dd483478(VS.100).aspx
======================================
Microsoft® Community Contributor 2011 | AWARD
MCTS
My Blog
Follow Me
munishchauha...
Member
99 Points
24 Posts
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 08:38 AM|LINK
Check out if your client's server (IIS) is configured to run framework 4.0.
Also try uploading the web.config again, by removing targetFramework="4.0" attribute from <compilation...> section, just to check if it runs.
Simplicity is the ultimate sophistication
vineeta_2010
Member
149 Points
151 Posts
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 10:24 AM|LINK
@rajesh
thankx for replying
where should I make these changes??....on my own computer or the on the web server where I am deploying my site??pls reply
vineeta_2010
Member
149 Points
151 Posts
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Jul 02, 2012 12:00 PM|LINK
@
munishchauhan.....thanx a......lot it works!:)my site has got loaded
Sumanuski
Member
3 Points
1 Post
Re: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Dec 25, 2012 10:25 AM|LINK
Just go to your IIS Manger in your local machine, from the left side panel choose application pools and then Double click on DefaultAppPool change the .net framework Version to be v4.030319.
That Should work for you.