Share via


IIS 7 Tip #2 You can now run 32 bit and 64 bit applications on the same server

On a 64 bit Windows 2003 machine IIS 6.0 could either be run in 32 bit mode or 64 bit mode. You toggled the Enable32bitAppOnWin64 metabase key and all the worker process would run in a particular bitness mode.

With IIS 7.0 the Enable32bitAppOnWin64 key has been moved to the Application Pool level. So you can now set the bitness of a particular Application Pool.

appcmd set apppool /apppool.name:DefaultAppPool /enable32bitapponwin64:true

This will make only the DefaultAppPool to run in 32 bit mode. You can have other application pools running simultaneously in 64 bit mode.

You can also list the apppools based on bitness using the appcmd command. To list all the application pools runningin 64bit mode use the following command

appcmd list apppools /enable32bitapponwin64:false

Now since application pools can be run in different bitness mode we also need to ensure that the dlls/modules that get loaded in the process are of the correct bitness. To do this you can configure a preCondition. For example this global module entry specifies that it should only be loaded if the bitness of the application pool is 32 bit.

<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />

You can also set the application bool bitness via the IIS manager

apppool

Bookmark and Share

Comments