Open 32-bit applications in 64-bit systems, especially OLE DB

Source: Internet
Author: User
Tags ole

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
    • 24

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:

    1. Right click on the application Pool and select "AdvancedSettings ..." or select the same from the Actions pane afte R Selecting the application pool
    2. Change the 'Enable 32-bit applications' to True (if you want the application pool to spawn in a 32-bit m Ode
    3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.