Microsoft KB Archive/281335

= How to Isolate a DLL into a Separate Process By Using Component Services =

Article ID: 281335

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q281335



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



SUMMARY
When you troubleshoot Internet Information Server (IIS), it is a common practice to isolate Web applications by running them in a separate memory space, which is referred to as Out-of-Process (OOP). However, sometimes if a component is used on multiple ASP pages, and in multiple Web applications, it can be difficult to isolate the module (DLL) that contains the object from the rest of the Web site. Sometimes you must isolate a COM DLL into a separate process to determine if it contributes to problems that affect Web server performance. Component Services (COM+) 1.0, in Microsoft Windows 2000, provides the ability to isolate a COM DLL into a separate process.



MORE INFORMATION
The steps that follow provide a procedure for isolating a DLL. After the DLL is isolated, any process that uses the isolated DLL makes RPC calls to the Dllhost.exe process that contains the isolated DLL, rather than loading the DLL within its own process space.

'How to Isolate a COM DLL in Windows 2000'

 On the Taskbar click Start, point to Programs, point to Administrative Tools, and then click Component Services. Expand the Computers folder, expand My Computer, and then select the COM+ Applications folder. Right-click the COM+ Applications folder, click New, and then click Application. This creates a new Application. Click Next. Click Create Empty Application. Assign a Name to the application (that is, the same name as the COM DLL). Do not include any periods.</li> Select Server Application.</li> Click Next.</li> Set the Security Context required by the DLL by: <ul> Selecting either the Interactive (Logged on) user.

-or-

</li> Specify credentials to impersonate This user.</li></ul>

</li> Click Next.</li> Click Finish.</li> To add the DLL to the new COM+ Application, right-click the Components folder that is inside the new COM+ Application.</li> Click New | Component.</li> Click Next.</li> Select Install new component(s).</li> Browse to the folder that contains the DLL to isolate.</li> Select the DLL to isolate.</li> Click Open.NOTE: You must select a COM or COM+ DLL, otherwise this error message occurs:

One or more files do not contain components or type libraries. These files can not be installed.

</li> Click Next.</li> Click Finish.</li> <li>Reset the IISADMIN service to ensure that the DLL was not in use by the InetInfo.exe process. To do this: <ol> <li>On the Taskbar click Start, and then click Run.</li> <li>In the Run dialog box type:

iisreset </li> <li>Click OK.</li></ol> </li></ol>

After the DLL is called you should see your new component spinning in the window.