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 (5)

  1. sirisha kalidindi says:

    We have windows 2008 server with IIs 7.0 installed and want to run both IIS7.0 and ASP.NET 2.0 in 32-bit mode.

    we execute this command:

    cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

    Then when we tried to execute the below command:

    %SYSTEMROOT%Microsoft.NETFrameworkv2.0.50727aspnet_regiis.exe -i

    It gives an error message:

    "The error indicates that IIS is not installed on the machine. Please install IIS before using this tool.

    Finished installing ASP.NET <2.0.50727>"

    We know that IIS is installed but not sure why this Error is displayed.

  2. ionutg says:

    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

  3. Swetha says:

    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."

  4. Gonzalo says:

    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

  5. ionutg says:

    Hi, it looks like there are two ways to fix this issue:

    1. Install .NET Framework 3.5 SP1 and see if that will fix your problem.  It seems as if the older verson 2.0.xxxx is not set to recognize the latest version of IIS included with Windows 7

    2. Do you have Visual Studio installed on the machine? If yes, could you start the command prompt with the link to "x64 Visual Studio command prompt". If this fails 1. should be the proper way to fix it.

    Please let me know if it's still failing.

    Thanks,

    Ionutz

Skip to main content