Help and Support
 

powered byLive Search

How To Configure a DLL Surrogate for Use with ASP

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:194023
Last Review:March 16, 2005
Revision:1.2
This article was previously published under Q194023
On This Page

SUMMARY

This article explains how to configure the registry to use in-process components outside the main process either on the same machine or on a remote server.

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

Back to the top

MORE INFORMATION

DCOM provides a default DLL surrogate (Dllhost.exe) that can act as a host for your in-process components. The file Dllhost.exe is an executable component that you can run remotely and instruct to load any in-process component, providing the component with a surrogate parent process and security context.

Back to the top

Running In-Process Components Locally

To activate an in-process component in the context of a DLL surrogate, two settings must be configured in the registry. These settings can be made in the component's self registration code, or by using the following example surrogate.reg file:
   REGEDIT4

   [HKEY_CLASSES_ROOT\CLSID\{10000002-0000-0000-0000-000000000001}]
   "AppID"="{10000002-0000-0000-0000-000000000001}"

   [HKEY_CLASSES_ROOT\AppID\{10000002-0000-0000-0000-000000000001}]
   @="Surrogate DLL Sample"
   "DllSurrogate"=""
				
Since no surrogate name is provided in this case, the system-supplied surrogate, Dllhost.exe, will be used by default.

Back to the top

Running In-Process Components Remotely

To configure a surrogate process to run remotely, all the standard registry entries configured via the component's self registration routine need to be present on the client machine, plus the following entries:
   REGEDIT4

   [HKEY_CLASSES_ROOT\CLSID\{10000002-0000-0000-0000-000000000001}]
   "AppID"="{10000002-0000-0000-0000-000000000001}"

   [HKEY_CLASSES_ROOT\AppID\{10000002-0000-0000-0000-000000000001}]
   @="Surrogate DLL Sample"
   "RemoteServerName"="Remote_Computer_Name"
				
These entries specify whenever a client comes looking for the component, the component should actually be run on another machine specified by the RemoteServerName value.

Back to the top


APPLIES TO
Microsoft Active Server Pages 4.0

Back to the top

Keywords: 
kbdcom kbhowto kbwebserver KB194023

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.