Running 32 bit ASP.Net applications on a 64bit OS

Here's a thing that haunted me the last few days:

I have this 64bit Windows Server 2K8 machine which I'm trying to convince to run 32bit code under IIS7. In the same time I have a 64bit Windows Server 2K3 on which I'm trying to do the same.

After bumping my head into walls for some time I found out this nice description of how to solve the problem for IIS 6:
http://support.microsoft.com/kb/894435
Mainly the trick is to be able to register the 32bit framework (running aspnet_regiis fails)... so the solution goes like this:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
%SYSTEMROOT%\Microsoft.NET\Framework\<version>\aspnet_regiis.exe -i

Now the bad thing is that you would need to turn it off if you want to run 64 bit applications under ASP.Net.

On IIS7 this problem is solved (you can run them both) but the solution to have it working is different than what was for II6:
http://blogs.msdn.com/rakkimk/archive/2007/11/03/iis7-running-32-bit-and-64-bit-asp-net-versions-at-the-same-time-on-different-worker-processes.aspx
This blog will show in details how to do it so on IIS7 you could run both 32 and 64 bit ASP.Net applications.
If you need the short fast version, for 32bit you need to go to the application advanced properties page and just flip a flag "Enable 32Bit applications" from False to True.

Wasn't that easy? (Once you found it...)

Thanks,
Ionutz

Comments

  • Anonymous
    April 08, 2009
    The comment has been removed

  • Anonymous
    May 18, 2009
    On Win2K8 it's different thw way you get IIS up and running. You need to start ServerManager, go to Roles, Add Role, select Web Server and make sure it shows as installed. Let me know if this worked for you. Thanks, Ionutz

  • Anonymous
    January 31, 2011
    Yes it worked for me . However still facing the issue. "The error indicates that IIS is not installed on the machine. Please install IIS before using this tool."

  • Anonymous
    February 02, 2011
    I have the same problem. "The error indicates that IIS is not installed on the machine. Please install IIS before using this tool." I try with 32 and 64 versions of ASP.NET 2.0 and have the same problem. Can you help me

  • Anonymous
    February 11, 2011
    The comment has been removed