Iis7-running 32-bit and 64-bit ASP. Versions at the same time on different worker processesiis7-running 32-bit and 64-bit ASP. Versions at the same time on different worker processesrate this
rakkimk 3 Nov
In IIS6, this is a pain area. On a 64-bit Windows 2003 Server, you cannot run workers processes in both 32-bit mode and as well as the bit mode. Either only one of them is possible. This is possible by the below Metabase Key which would is applied to the W3svc/apppools node.
W3svc/apppools/enable32bitapponwin64: true | False
Read the How-to does this in the IIS 6.0 here. But with IIS7, you can run 32-bit and 64-bit worker processes simultaneously. Let's see how to do it.
You had the same Enable32bitAppOnWin64 property for the ApplicationPools in the applicationhost.config. Now, you can set the this for individual application pools. Below is my sample configuration:
<applicationPools>
<add name= "Myapppool32bit" autostart= "true" enable32bitapponwin64= "true"/>
<add name= "Myapppool64bit" autostart= "true" enable32bitapponwin64= "false"/>
<applicationPoolDefaults>
<processmodel identitytype= "NetworkService"/>
</applicationPoolDefaults>
</applicationPools>
Below is the from IIS7 Manager:
- Right click on the application Pool and select "AdvancedSettings ..." or select the same from the Actions pane afte R Selecting the application pool
- Change the 'Enable 32-bit applications' to True (if you want the application pool to spawn in a 32-bit m Ode
- Click OK
Below is what do I from the APPCMD:
Appcmd Set Apppool/apppool.name:myapppool32bit/enable32bitapponwin64:true
Appcmd Set Apppool/apppool.name:myapppool32bit/enable32bitapponwin64:false
Note:by default, it is false.
Most of your may already know how to see if the process was really spun in a 32-bit mode in 64-bit OS. Yes, simple-is-to-open the Task Manager and go to Processes Tab–you would see the below:
Now, your may ask how does the correct version of the DLLs picked up automatically. Open your applicationhost.config and search for Aspnet_filter. You would see the below:
<isapiFilters>
<filter name= "asp.net_2.0.50727.0" path= "%windir%\microsoft.net\framework\v2.0.50727\aspnet_filter.dll" Enablecache= "true" precondition= "Bitness32"/>
<filter name= "asp.net_2.0.50727-64" path= "%windir%\microsoft.net\framework64\v2.0.50727\aspnet_filter.dll" Enablecache= "true" precondition= "Bitness64"/>
</isapiFilters>
The precondition= "bitness32" or "bitness64" decides which ISAPI Filter to pick up for corresponding mode S. Same case with any DLL used, for example ISAPI Filter, Modules, etc.
Happy learning!
Open 32-bit applications in 64-bit systems, especially OLE DB