Multiple ASP.Net Versions of Windows 2003 Server 64-bit
One of my dedicated servers at PowerDNN is running 64–bit Windows 2003 Server. Recently I had to get an app that was ASP.Net 1.1–dependent to run on this box. No problem, right? Wrong…big problem. Turns out that in order to run ASP.Net 1.1 and 2.0 concurrently on 64–bit Windows Server, you have to run IIS in 32–bit mode. Here’s the reason according to Microsoft KB894435:
IIS 6.0 supports both the 32-bit mode and the 64-bit mode. However IIS 6.0 does not support running both modes at the same time on a 64-bit version of Windows. ASP.NET 1.1 runs only in 32-bit mode. ASP.NET 2.0 runs in 32-bit mode or in 64-bit mode. Therefore, if you want to run ASP.NET 1.1 and ASP.NET 2.0 at the same time, you must run IIS in 32-bit mode.
Unfortunate, but understandable. I followed the instructions in the article and everything worked fine until I needed to switch the ASP.Net version for the app that I mentioned earlier. Despite having both versions of ASP.Net installed, the ASP.Net tab was not displayed.
Googling a bit, I discovered that this problem often appeared when upgrading from an ASP.Net 2 beta to the production version. The fix was to delete some obsolete registry keys and register the framework again using aspnet_regiis. I did this, rebooted and saw no difference.
After spending almost two hours looking for a solution, I decided that there was no easy fix (of course, I was completely wrong). It then occurred to me that since the properties dialog is just a UI for WMI, it should be possible to accomplish the ASP.Net version switching using script. Googled some more and discovered that this was a solution, but not the simplest one. If you know the website ID, then aspnet_regiis can set the ASP.Net version for an IIS site. And Denis Bauer (of Reflector File Disassembler fame) had already solved the problem with a neat utility called ASP.Net Version Switcher.
This utility solved the problem and had me up and running in seconds. I selected the site, clicked the ASP.Net version I wanted and hit the Switch button. Done.