Wednesday, December 16, 2009

How to run 32bit .net application on 64bit windows

Finally we are in production with 3.5 .net framework. We were in 1.1 version. Converting the project from 1.1 to 3.5 was not hard for us. But testing all project and taking to live took time. We solved every problem and finally closed the system to go live with new .net version. When we run the new version we saw there was a problem with 3.5 version on 64bit server. Since developers work on 32bit systems we miss the testing 64bit environment.

Here are the steps to run 32bit .net application on 64bit windows server:
1. Click Start, click Run, type cmd, and then click OK.

2. Type the following command to enable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

3. Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

4. Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.