IIS 7.5 and .NET Framework 4 – Installation order does matter

1. The Issue

The MSDN documentation ( ASP.NET IIS Registration Tool ) states the following about installing .NET Framework 4 together with IIS 7.5:

The .NET Framework 4 can be installed side-by-side with previous versions of the .NET Framework on a single computer. If IIS was previously enabled on the computer, the setup process for the .NET Framework automatically registers ASP.NET 4 with IIS. However, if you install the .NET Framework 4 before you enable IIS, you must run the ASP.NET IIS Registration tool in order to register the .NET Framework with IIS and create application pools that use the .NET Framework 4.

What this means is that if you install .NET Framework 4 after installing IIS then everything gets registered properly. However, if you install .NET Framework 4 before installing IIS then you need to perform an extra step as outlined below.

2. The Solution

Run the following command from an administrative command prompt:

aspnet_regiis.exe -iru -enable


-iru          Install this version of ASP.NET. If there are any existing applications that use ASP.NET, it will not change IIS configuration to use this version.

-enable          ASP.NET will be enabled in the IIS security console (IIS 6.0 or later).

3. Some Notes

  • You must ensure that the aspnet_regiis.exe file that is included in the .NET Framework 4 installation directory is used. The location of this file is as follows:
Version of .NET Framework Location of Aspnet_regiis.exe file
.NET Framework version 4 (32-bit systems) %windir%\Microsoft.NET\Framework\v4.0.30319
.NET Framework version 4 (64-bit systems) %windir%\Microsoft.NET\Framework64\v4.0.30319
  • The 64-bit version should be used for Windows Server 2008 R2.
  • From the readme file:

ASP.NET 4 must be re-registered if IIS 7.5 or the IIS 7.5 .NET Extensibility feature is enabled *after* the .NET Framework 4 has already been installed on the computer. ASP.NET 4 must also be re-registered if the .NET Extensibility feature is removed when the .NET Framework 4 is installed on the computer.

4. Verification

The following diagram shows the default application pools within IIS 7.5 on Windows Server 2008 R2. In this case, .NET Framework 3.5 SP1 has been installed (supplied with the operating system). Note that this is registered as .NET Framework 2.0.

The next diagram shows the default application pools within IIS 7.5 on Windows Server 2008 R2 after .NET Framework 4 has been installed.

(Note: 20110926 – I decided to extend this article and include screenshots for when IIS 7.5 is installed on top of a Windows 2008 R2 Server that already has .NET Framework 4)

This entry was posted in .NET Framework 4 and tagged , , . Bookmark the permalink.

3 Responses to IIS 7.5 and .NET Framework 4 – Installation order does matter

  1. Laurel says:

    Thank you so much for posting this. I have spent hours on this issue and finally stumbled across this which got me on the right path.

  2. Sue says:

    Get Post. After you create the 3 default app pools in .net 4.0, can you delete the first two the ASP.NET v4.0 Integrated and the ASP.NET v4.0 Classic if you are going to just use the DefaultAppPool? Thanks.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s