Friday, 24 July 2009

Switch IIS to 32bit mode

I've just tried installing a 32bit application in to IIS which was running in 64 bit mode. This didn't work, we had to switch IIS to run in 32 bit mode.

IIS to 32 bit mode


To do this, in a command prompt enter the following
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

You will have to reconfigure ASP.NET by using the following command depending on the version of ASP.NET you have installed.

ASP.NET 1.1

%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

ASP.NET 2.0

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

IIS to 64 bit mode

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

You will have to reconfigure ASP.NET by using the following command depending on the version of ASP.NET you have installed.

ASP.NET 1.1

%SYSTEMROOT%\Microsoft.NET\Framework64\v1.1.4322\aspnet_regiis.exe -i

ASP.NET 2.0

%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i

This Mircosft KB explains more.

No comments: