a developer's notes – a semi-technical web development BLOG

September 29, 2011

Why can’t I run my .NET 4.0 site on Windows 2003 with IIS 6?

Filed under: ASP.NET — Duy Nguyen @ 10:44 pm
Tags: , , , , , , , , , , , , , , , , , ,

IIS 6 (that comes with Windows 2003) does not let you have more than one framework at a time running in the same instance like IIS7 that can create Application PoolS targeting different frameworks. This just means a single application pool can’t be used for two different frameworks like IIS7.

You have a two options:

  1. Downgrade the .NET application to 3.5 with Visual Studio 2010. Just go to the Website project properties, Application tab and there is a drop down with all the framework releases, select 3.5.

    VS2010 will reload the project and modify the web.config. If you added A web service reference, thEN you may have to delete them and re-add them under 3.5

  2. Configure IIS6 with a second application pool and a second web site.

    • Create a new application pool…

      and new web site…

      Then assign this application pool to the Framework 4 web application that will be hosted by your new site. To assign the application pool, in the IIS console open the properties section of the web application, and click on the “Home directory” tab and select the application pool which you have created earlier.

    • Then you need to change the ASP.NET version of your application. Right click your virtual directory that hosts your application and click the property and check the ASP.Net. Select Framework 4.

    • Select ASP.NET 4.0 on IIS6 under Web Service Extension. Go to the IIS6 console open “web service extension node” which is right below the “default website” node. You will see the entire ASP.Net framework list that is installed. By default these frameworks might be prohibited so please select ASP.Net Framework 4 and click allow button.

      *If you don’t see ASP.NET 4.0, make sure the framework is installed on the server! If it is, then open a command prompt go to this directory: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
      Then run this command: aspnet_regiis -i

      You will now see ASP.NET 4.0. If you don’t set ASP.NET 4.0 to ALLOW, You will get a “404 Page is not found.”

Check out this great article:

http://stackoverflow.com/questions/2821514/default-aspx-with-iis-6-0-and-net-4

Advertisements

1 Comment »

  1. Excellent. This solved my problem which was to ‘allow’ ASP.NET v4.0 in web service extensions. I kept getting the web page not found (404) error. Thanks

    Comment by Anonymous — June 21, 2012 @ 2:30 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: