Installing ASP.NET 4.0 on Server2003/IIS6

02Aug10

I was deploying an application for a client today when I realized that they didn’t have the 4.0 framework installed on the target machine. I’ve done this plenty of times, but apparently I forget this one configuration step each time. For the benefit of myself and hopefully others, here is a description of the problem and the solution.

Problem: we need to install a 4.0 application to a server that is running IIS6 and doesn’t have the 4.0 framework yet installed.

Initially, hitting the page gives us the following error:

Line 19: /> Line 20: <system.web> Line 21: <compilation debug=”true” targetFramework=”4.0″/> Line 22: </system.web> Line 23: </configuration>

Ok, great, so all we have to do is install .NET 4.0. We’ll fire off the web installer from here

Once we have things installed, we can select 4.0 as the framework for our site in the IIS6 configuration page for the site:

So far, so good. Restart IIS and browse to the page, and:

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.


Please try the following:

  • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
  • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
  • Click the Back button to try another link.

HTTP Error 404 – File or directory not found.
Internet Information Services (IIS)

Hmm.. a 404 error? Double check that .aspx files are registered to the new aspnet ISAPI filter:

Yes, they are registered. What else could cause a 404 error for our aspx pages? Other file types work: xml, html, etc.

This is the part that I always forget:

By default, new extensions are disabled. We have to enable the ISAPI extension that processes 4.0 framework pages.

Hopefully this helps someone out. It will help me the next time.

Advertisements


No Responses Yet to “Installing ASP.NET 4.0 on Server2003/IIS6”

  1. Leave a Comment

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


%d bloggers like this: