I've been developing an ASP.NET 4.0 application on my local machine, and today I tried to deploy it to the server. After deploying, I got the following message when trying to visit the site in my browser:

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Ok, no problem. That means the server's still running ASP.NET 2.0. I'll just upgrade it, right?

It hasn't been that simple.

First I installed the .NET Framework v4.0. I followed the instructions that I found at this link to enable the ASP.NET ISAPI DLLs in IIS. When I run "cscript iisext.vbs /listfile " I can see the ASP.NET 4.0 DLLs listed, and that they're enabled. However, the behavior of my application hasn't changed. I still get the same error message.

I suspect I need to change the ASP.NET version in the web site configuration in IIS. However, I can't find any way of doing so. When I right-click on either the website, the virtual directory housing my application, or the application pool in IIS, and then click "Properties" from the context menu, I expected to find an "ASP.NET" tab among the properties pages that would let me change the ASP.NET version for that site/application. However, there is no "ASP.NET" tab or properties page for some reason. Why not? How do I fix this and switch my app to .NET 4.0?

Again, this is Windows Server 2003 R2, I believe the IIS version is 6.

  • Is the server OS 32-bit or 64-bit?
    – Luke99
    Feb 15, 2011 at 21:52
  • 64-bit OS. IIS is in 32-bit mode though. Feb 16, 2011 at 15:06

2 Answers 2


I think this will take you to the right direction:

How To Switch Website To ASP.NET4.0 in Windows Server 2003 IIS6.0

Try running aspnet_regiis.exe -i from the .Net 2.0 framework directory if ASP.NET-tab is missing.

Edit: if ASP.NET-tab still missing:

  1. Uninstall IIS (including ASP.Net)

  2. Reboot the machine.

  3. Reinstall IIS + ASP.net

  4. Run aspnet_regiis -ir

Edit2: As why the ASP.net tab is missing, this post might give some clues.

".. Apparently on Windows Server 2003 64 Bit Editions and Windows Server 2003 R2 the ASP.NET Tab in IIS doesn't appear, no fix, that's it, it's gone! .... The ASP.NET tab does not appear on x64-based editions of Windows Server 2003 and Windows Server 2003 R2. This tab also does not appear if only one version of ASP.NET is allowed in the web service extensions."

  • The Method 1 in your link - go to the ASP.NET tab in the properties page and change the version - that tab doesn't exist on my machine for some reason. As I mentioned in my question, the ASP.NET tab is completely absent from the properties window. I'll give the second method (command line utility) a shot, but I'd still like to know why the ASP.NET properties page isn't available.... Feb 15, 2011 at 21:46
  • @Joshua you need to run aspnet_regiis -i
    – Greg B
    Feb 15, 2011 at 21:53
  • @Greg B - Yeah, I did that too. Didn't help. Feb 16, 2011 at 14:03
  • Running "aspnet_regiis.exe -norestart -s 'W3SVC/<SiteID>/root'" as suggested in @Luke99's first link fixed the issue with IIS running 2.0 instead of 4.0. However, the ASP.NET tab still isn't present in the IIS site properties. Still working on that. I've tried to reinstall the framework, as well as some of the registry changes Luke99's second link suggested, and no luck so far. Haven't tried everything yet. Feb 16, 2011 at 15:09
  • 1
    You should uninstall .Net Frameworks & IIS. Then re-install. Look this link: blog.angrypets.com/2006/05/missing_aspnet_.html "...The ONLY place that you won't see the ASP.NET tab is when you are running an x64/ia64 System and have IIS set to run in 32bit compatibility mode. "
    – Luke99
    Feb 16, 2011 at 15:37

I know an answer was already accepted on this, but this same error can also occur if your site is simply using the wrong app pool. Make sure you have a .net 4.0 app pool or an asp.net 4.0 app pool set as active for the web app and also make sure that the app pool itself is started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.