Charteris Community Server

Welcome to the Charteris plc Community
Welcome to Charteris Community Server Sign in | Join | Help
in Search

Ivor Bright's blog

Installing .Net 1.1 applications on Windows Server 2008 R2

I recently needed to get an ASP.Net 1.1 application working on Windows Server 2008 R2. I naively assumed that this was just going to work but then the whole 32/64 bit problem emerged.

.Net 1.1 is 32 bit only and Server 2008 R2 is 64 bit only! Well – WOW64 has been around quite a while so surely this would be a piece of cake. I proceeded to download the .Net Framework Version 1.1 Redistributable Package and when you attempt to install – you get your first hint about the potential problems ahead.

At this stage – you have 2 choices:

  • Attempt to upgrade your application to a 64 bit version of the framework
  • Attempt to get .Net 1.1 working on Server 2008 R2

My preference was to get .Net 1.1 working as I didn’t want to go through a test cycle for an application I didn’t really understand on a new version of the framework. However – rather than just choosing “Run Program” from the Program Compatibility Assistant dialog – I did some research and used the following process to get my application to work.

1 - Install IIS Metabase Compatibility

To install on Windows 2008 Server – click Start and then “Server Manager”.

Under Web Server (IIS), click Add Role Services.

Ensure that IIS Metabase Compatibility is installed.

2 - Install .Net 1.1

I installed .Net 1.1 in the following order:

I still got a compatibility warning, but chose “Run Program” to continue.

Installing Service Pack 1 is likely to require a reboot.

3 – Enable ASP.Net 1.1 ISAPI Extension

Following the steps in option 2 made ASP.NET v1.1.4322 available on my ISAPI and CGI Restrictions dialog, but was disabled by default. Open Internet Explorer, click on your server name and choose ISAPI and CGI Restrictions from the IIS section. Enable ASP.Net v1.1.4322 as a valid ISAPI extension.

4 – Adjust machine.config

We need ASP.NET 1.1 to ignore IIS configuration sections, so open machine.config for Framework 1.1 (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) and add the following towards the end of configSections.

   1: <section name="system.webServer" type="System.Configuration.IgnoreSectionHandler, 
   2:     System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 

5 – Adjust the Application pool

I now needed to tell my application to use the application pool ASP.NET 1.1. Use IIS Manager, choose the site that you are working with and choose “Advanced Settings”. Adjust the application pool to use ASP.NET 1.1 which will use .Net Framework 1.1.

6 – Fix applicationHost.config bug

IIS runtime detected that I was running on a 64 bit operating system, so it attempted to load .net framework configuration from Microsoft.Net\Framework64, but this doesn’t exist for .Net Framework 1.1. The solution is to copy the 32 bit version into the appropriate 64 bit folder.

  • Create \Windows\Microsoft.net\Framework64\v1.1.4322\config
  • Copy machine.config from \Windows\Microsoft.net\Framework\v1.1.4322\Config\

7 - Check any application registry settings

My application relied upon a number of custom application registry settings. In the 32 era – this wasn’t a problem as registry settings were in the “same” expected place. e.g. most people put registry settings under HKEY_LOCAL_MACHINE \ SOFTWARE someplace. However – on a 64 bit machine – the 64 bit software settings are stored in this expected place, while 32 bit settings are stored under HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node.

This is probably easiest to explain by giving an example. My application needed to access HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ ConfigurationManagement \ hashKey. In order to make this setting available to a 32 bit application running on a 64 bit server, you need to store the key as  HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ ConfigurationManagement \ hashKey.

I initially exported the keys from an existing Server 2003 machine and imported them onto Server 2008 which put them into HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ ConfigurationManagement \ hashKey. This is where Windows expects you to store your 64 bit settings, so you need to move them to the corresponding location under Wow6432Node.

This caused a lot of pain and confusion trying to understand why my application couldn’t read registry settings which were obviously there. The solution is to put your 32 bit registry settings where your 32 bit application will attempt to read them – under Wow6432Node.

Some useful references for understanding the 32/64 bit registry issues are:

Finally, after following all of the above – my 32 bit .net 1.1 application  was working correctly on Server 2008 R2.

Useful links

Technorati Tags: ,
Published Jul 15 2010, 05:17 PM by IvorB
Filed under:

Comments

 

Terence said:

Hi,

May i know how you install the .NET 1.1 in Window Server 2008 R2. I have downloaded the .NET 1.1, and when install i have set the compatibility with Window Server 2003 SP1. But, i get error msg given by WS2008 R2. Pls advise?

Thank you.

Best Regard,

Terence

July 26, 2010 3:09 AM
 

IvorB said:

Hi Terence,

The best advice I can give is to follow the steps in this post. Note: even if you follow the steps - you will get a warning message about compatibility issues. However - it doesn't stop the install process (choose "Run Program" to continue), and your application should work if you follow the steps.

When you say error message - do you mean the compatibility warning message?

thanks

Ivor

July 26, 2010 10:57 AM
 

Stefan Plattner said:

Worked like a charm! Thank you very much for posting this solution!

Stefan

August 9, 2010 12:30 PM
 

Robert said:

I am bit confused on step 7; which settings exactly do i put ito the Win64Node? I dont see copmpany name anywhere; in the areas that you have desribed.

Thanks,

Robert

August 10, 2010 5:09 PM
 

IvorB said:

Hi Robert,

On re-reading that section - I'm inclined to agree that its a bit confusing and I will attempt to rewrite so it's clearer. Like most things - its probably easiest to explain by example.

My application code was reading a registry key at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ ConfigurationManagement \ hashKey.  However, on a 64 bit machine - this maps to HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ ConfigurationManagement \ hashKey. Basically - the elements at the default location are 64 bit and you need to put the 32 bit elements into the corresponding location under Wow6432Node.

To read around the issue, I recommend msdn.microsoft.com/.../ms724072(VS.85).aspx or msdn.microsoft.com/.../aa384253(VS.85).aspx

Hope this helps

thanks

August 11, 2010 3:42 PM
 

Jersey said:

Ivor, a simpler way to get your 32-bit apps working under ASP.NET 1.1 is to set "Enable 32-Bit Applications" to TRUE on the ASP.NET 1.1 application pool's advance settings.

Then you don't have to copy folders or edit the registry.

August 25, 2010 11:20 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Commercial Edition), by Telligent Systems