32-bit and 64-bit ASP.NET
Many developers struggle with the use of 32-bit and 64-bit address spaces. In a nutshell, 32-bit assemblies cannot be loaded within 64-bit address spaces and 64-bit assemblies cannot be loaded within 32-bit address spaces. Web applications are no different. As a result, special attention needs to be paid to the requirements of web applications running on 64-bit servers.
If a web application is installed on a 64-bit server and requires use of a 32-bit assembly, IIS must be configured with a 32-bit address space. Fortunately, the process of changing address spaces on a 64-bit server is not overly complicated. To configure a 64-bit Windows server to run 32-bit ASP.NET web applications via IIS, perform the following steps:
- From a command prompt window, uninstall 64-bit ASP.NET:
C:\WINDOWS\Microsoft.NET\Framework64\... ...\v2.0.50727\aspnet_regiis.exe -u
- From a command prompt window, configure IIS so that it operates in WOW64 mode (Windows On Windows 64, otherwise known as 32-bit):
cscript.exe C:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
- From a command prompt window, install 32-bit ASP.NET:
C:\WINDOWS\Microsoft.NET\Framework\... ...\v2.0.50727\aspnet_regiis.exe -i
- From Computer Management, allow the ASP.NET v2.0.50727 (32-bit) IIS Web Service Extension (see image below):
- Recreate all existing web sites and/or virtual directories

Following the above steps will result in all web applications running under a 32-bit address space. In other words, it’s all or nothing; 32-bit and 64-bit web applications cannot co-exist on the same server. Please feel free to leave a comment if you anything additional to add, and if you need help making these configuration changes, don’t hesitate to contact us.
Tags: 32-bit, 64-bit, ASP.NET, IIS, Microsoft Windows Server, web, web server, Windows on Windows 64
Read more posts by Paul Luc





