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:

  1. From a command prompt window, uninstall 64-bit ASP.NET:
    C:\WINDOWS\Microsoft.NET\Framework64\...
    ...\v2.0.50727\aspnet_regiis.exe -u
  2. 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
  3. From a command prompt window, install 32-bit ASP.NET:
    C:\WINDOWS\Microsoft.NET\Framework\...
    ...\v2.0.50727\aspnet_regiis.exe -i
  4. From Computer Management, allow the ASP.NET v2.0.50727 (32-bit) IIS Web Service Extension (see image below):
  5. 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.

Share and Enjoy:
  • Digg
  • Facebook
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • Mixx
  • MySpace
  • NewsVine
  • Ping.fm
  • Sphinn
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz
  • Print
  • email
  • RSS

Tags: , , , , , , ,

Read more posts by Paul Luc

This entry was posted on Thursday, July 29th, 2010 at 10:54 pm and is filed under Developer's Corner, Development / Programming, Platform Technologies. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply




Message: