Installing ASP.NET 4 in IIS 6



With the new .NET 4 framework, comes some problems if you are still running still IIS 6 on Windows Server. IIS 6 does not let you have more than one framework at the time running in the same instance like IIS7 that can create a Application Pool targeting a different framework.

When IIS 6 runs under ASP.NET 2.0 (3.0 and 3.5 are superset, not frameworks) you are going to hit this error if the application is 4.0

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 11:     </configSections>
Line 12:     <system.web>
Line 13:         <compilation debug="true" targetFramework="4.0">
Line 14:         </compilation>
Line 15:         <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>

You have a few options, downgrade the .NET application to 3.5 that Visual Studio 2010 makes it really easy. Just go to the WebSite properties -> Application tab and there is a drop down with all the framework releases, select 3.5, you VS2010 will reload the project and modify the web.config, if you added web service reference, that you may have to delete them and re-add them under 3.5

image

Now, you’ll have to unregister the ASP.NET 4.0 under IIS6, to do so, go to your console windows and go to the directory Windows/Microsoft.NET/Framework/v4.xxxx and type->aspnet_regiis /u

image

Then register ASP.NET 2.0 by going to Windows/Microsoft.net/Framework/v2.xxxxx> type aspnet_regiis /i

Hope that work for you.

Cheers

Al

Published Thursday, July 01, 2010 8:48 PM by albertpascual
Filed under: , ,

Comments

# Twitter Trackbacks for Installing ASP.NET 4 in IIS 6 - Al Pascual ASP.NET Blog [asp.net] on Topsy.com

Pingback from  Twitter Trackbacks for                 Installing ASP.NET 4 in IIS 6 - Al Pascual ASP.NET Blog         [asp.net]        on Topsy.com

# re: Installing ASP.NET 4 in IIS 6

Friday, July 02, 2010 5:26 AM by Gordon Breuer

Shouldn't the posting be named "Uninstalling ASP.NET 4 in IIS 6"?

Nevertheless, why did .NET 1.1 and .NET 2.0 work side-by-side in IIS6, but not .NET 4.0 ?!

Greets, Gordon

# re: Installing ASP.NET 4 in IIS 6

Friday, July 02, 2010 11:22 AM by Cecil Phillip

We have ASP.NET 3.5 and 4 running on IIS. We just created a separate Application Pool for .NET 4 apps only.

This post on Scott Forsyth's Blog works pretty much the same way.

weblogs.asp.net/.../436607.aspx

# re: Installing ASP.NET 4 in IIS 6

Friday, July 02, 2010 1:50 PM by Paul Bentley

The limitation is you cannot run different .net versions in the same app pool.  Just make a new app pool for each version and you can have .net 1, 2  and 4 all running happily in IIS 6.

# re: Installing ASP.NET 4 in IIS 6

Tuesday, February 08, 2011 3:28 PM by Vani

Thanks. This was really helpful.

# re: Installing ASP.NET 4 in IIS 6

Wednesday, March 16, 2011 1:35 PM by xr280xr

"The limitation is you cannot run different .net versions in the same app pool.  Just make a new app pool for each version and you can have .net 1, 2  and 4 all running happily in IIS 6."

Can you run 2.0 and 4.0 side by side in IIS 6 or not? I'm being told no but I don't have a server to test on at the moment.

# re: Installing ASP.NET 4 in IIS 6

Friday, March 25, 2011 11:30 AM by asdf

I'm a bit confused... so are we saying that ASP.NET 4.0 will not run on IIS 6? I'm assuming that because the direction was to downgrade app to .Net 3.5...

# re: Installing ASP.NET 4 in IIS 6

Monday, April 04, 2011 2:55 PM by Mike Bridge

This post makes no sense whatsoever.

# re: Installing ASP.NET 4 in IIS 6

Thursday, June 30, 2011 7:43 PM by Pete

Can you please remove this post it is one of the first on google searches and is incorrect. You can run .NET 2 in one application pool and .NET 4 in another on IIS 6.

# re: Installing ASP.NET 4 in IIS 6

Friday, November 04, 2011 10:57 AM by Jesse Taylor

This post is misleading on multiple fronts.  The title is completely incorrect but it may not matter because the content is factually incorrect as well.  I am here because I was confronted with this very issue, but Paul Bentley's post above is correct - I created a separate App Pool for my 4.0 app and I am now running multiple frameworks from my IIS 6 as well.  Thanks Paul!!!!

# re: Installing ASP.NET 4 in IIS 6

Friday, November 04, 2011 3:45 PM by hernan

Please, remove this!!!

Leave a Comment

(required) 
(required) 
(optional)
(required)