Workaround: Running ASP.NET 1.1 on Vista SP2/WS08 SP2

Many of you have probably read the article on how to install ASP.NET 1.1 on IIS7 on Vista and WS08 (The article can be found at http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis7-on-vista-and-windows-2008/).

While above works great on Vista/Vista SP1/WS08 RTM, if you try to run ASP.NET 1.1 on Vista SP2/WS08 SP2, you may have experienced the following error if you are on a 64-bit OS:

 There was an error while performing this operation.

Details:

 Filename:
\\?\C:\Windows\system32\inetsrv\config\applicationHost.config
Error:

Here is the problem.

In order to support .NET 4.0 Framework, IIS team has released a hotfix (http://support.microsoft.com/kb/958854) which is also included in SP2.  At the root of the problem is that this hotfix allows the IIS runtime to read the correct version of .NET Framework configuration based on the .NET Framework version that is associated with the application pool.  For example:

  • .NET Framework version 1.1: the config location is %windir%\Microsoft.NET\Framework\v1.1.4322\CONFIG
  • .NET Framework version 2.0: the config location is %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG
  • .NET Framework version 4.0: the config location is %windir%\Microsoft.NET\Framework\v4.0.nnnnn\CONFIG

The problem is that when the runtime tries to load the corresponding configuration, it doesn't take the bitness of the application pool into the consideration.  As you know, ASP.NET 1.1 is only supported on 32-bit.  So if you have a 64-bit OS, in order to run ASP.NET 1.1, you have to enable 32-bit applications in the application pool.  So, with the QFE/SP2 on 64-bit OS (and only on 64-bit OS), the runtime is incorrectly looking for the 1.1 version of the configuration under Framework64, which does not exist.

Workaround:

  1. Create the Framework64 directory for 1.1
    md \windows\microsoft.net\framework64\v1.1.4322\config\
  2. Copy the 32bit config to 64bit config location created in step 1.
    copy \windows\microsoft.net\framework\v1.1.4322\config\machine.config \windows\microsoft.net\framework64\v1.1.4322\config\

In the spirit of full disclosure, without the hotfix/SP2, the behavior was still incorrect on Vista/Vista SP1/WS08 RTM in that the runtime was alreays reading the 2.0 configuration although the application pool is configured to use .NET 1.1.  (Because the runtime was always reading the 2.0 config regardless of the .NET Framework version that is associated with the application pool.  This was the bug that hotfix/SP2 tried to address as part of supporting .NET 4.0, but it didn't quite consider the fact that ASP.NET 1.1 is only available in 32-bit.)  This bug in Vista/Vista SP1/WS08 RTM may not have been too obvious to those running ASP.NET 1.1 on 64-bit Vista/Vista SP1/WS08 RTM unless you have significant/specific settings/differences between 1.1 and 2.0 configurations.

5 Comments

  • I followed all steps from http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis7-on-vista-and-windows-2008/ and made it to work under "Windows Server 2008 x64" that is our test environment.. So, it works.. but when I try to repeat the same steps in production environment I get "System.Web.HttpException: Request timed out." exception.
    When I switch the same application on production environment to use 2.0 asp.net it works with exceptions on some pages which are related to "wrong .net version" and that is OK and tells me that application contacts database and other things in regular way. But when I set again the ASP.NET.1.1 app pool for it, I get "System.Web.HttpException: Request timed out."
    The only difference between the test and production environment is that I installed .Net 1.1 framework on test server when it contained Windows Server 2008 SP1, and production server contained Windows Server 2008 SP2.
    I upgraded the test server to SP2 and I got errors described in this blog, and fixed it on test and production server according to the workaround but I still have the "System.Web.HttpException: Request timed out." exception on production server and it works great on test server. (so, maybe the reason for problem is that we installed asp.net.1.1 after installation of SP2 on production server)
    Have you got any idea, suggestion... how to solve the problem on production server?
    Is there anybody who installed .NET 1.1 after installation of SP2 and succeeded to run application under ASP.NET.1.1. application pool?

  • I solved the problem that I described in my previous comment. The problem on production environment was in connection string that required info about the database port when I run application under asp.net.1.1... it works now

  • If a web site is not using ASP.NET (e.g. it uses PHP), another suitable workaround is to change the web site to use ASP.NET 2.0 or "no managed code".

  • This solved my problem. THANKS A BUNCH!!

    Workaround:

    Create the Framework64 directory for 1.1
    md \windows\microsoft.net\framework64\v1.1.4322\config\
    Copy the 32bit config to 64bit config location created in step 1.
    copy \windows\microsoft.net\framework\v1.1.4322\config\machine.config \windows\microsoft.net\framework64\v1.1.4322\config\

  • Brilliant - you just saved me 10+ hours of frustrated debugging ! :-)

Comments have been disabled for this content.