Running IIS6 in 32 bit mode on a 64bit Server


Running IIS6 on a Windows 2003 64 bit OS in 32 bit Mode

 

My application development team was using Cold Fusion MX 7 before we made the switch to ASP.NET in 2006.  We had quite a few applications which we had written in Cold Fusion MX 7. 

We were moving all our services to virtualized servers, and we were given a virtual server running 64 bit Windows 2003.

Cold Fusion MX 7 only works in 32 bit mode, so I had to switch the IIS on the server to 32 bit mode to get Cold Fusion MX7 to work on the server.


1)      IIS6 can run in either 32 bit mode or 64 bit mode.

2)      To change the mode to 32 bit mode run the following command:

 

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

(Set the value to 0 to return to 64 bit mode.)

 

 




 

 

Resynching ASP.NET to IIS


 

1)      Once in 32 bit mode, IIS may return a Service Unavailable error when presenting web pages.

2)      This is probably because it is trying to load the 64 bit .NET Framework.

3)      You have to register the 32 bit version of the .NET Framework with IIS.

4)      To do this run the following commands (for each version of .NET installed):

a.       C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i

b.      C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

5)      Finally, you'll have to update the Web Service Extensions in IIS to allow the 32 bit versions of ASP.Net to run.

 

 

Configuring App Pools to use

 

You might notice that the ASP.NET tab is now missing from the IIS management tool.  You'll have to manage the ASP.NET versions via the command line, unless Microsoft comes up with a patch.
  1.                 First we have to find the website iis path. Go into IIS, under the website properties under the "Website" tab there is the Logging section. Click on and right click on the "Properties" button. This will bring up the "Logging Properties" dialog which lists the name of the website at the bottom next to "Log file name" eg. W3SVCXXXX. Make a note of this.

2.      Open a command prompt to the c:\windows\Microsoft.net\Framework\v4.0.30319\ folder of your choice. (v2.x, or v4.x)

3.      Run aspnet_regiis -lk (that's -LK) this will list the websites and their paths and what version they are running. Use the name you found in step 1 to get the full path.

4.      Run aspnet_regiis -s PATH, e.g. aspnet_regiis -s W3SVC/123456789/root/ where PATH is the path you found in step 3.

 
ASP.NET 2.0 Deadlock issue
I had configured my application pools and made sure that the .NET 4.0 apps and .NET 2.0 apps were running in their own app pools.   However, one of our .NET 4.0 apps kept locking up.  You would try to access the app in a browser, and a blank page would show up with the browser remaining in a loading and waiting mode.
 
The application log offered a couple of clues to the cause:
1) Source: ASP.NET 2.0.507272.0, Event ID: 1062
It is not possible to run two different versions of ASP.NET in the same IIS process.  Please use the IIS administration tool to reconfigure your server to run the application in a separate process.
2) Source: W3SVC-WP, Event ID: 2262
ISAP 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'.
 
The cause of this was that I had a custom 404 Page not found that was pointing to a .NET 2.0 application page. 
I changed the custom 404 page to just the default static "Not Found" and reset the application pool and the application began working again. 

 

Comments

Popular posts from this blog

Getting Authentication Prompt When Accessing SharePoint Web Services

How To use ASPNET_SetReg to store encrypted data in the registry and then decrypt the data for use in your app

PowerShell Script to Clean the Windows Installer Directory