How To Configure DCOM for Visual Basic Using DCOMCNFG.EXE

Retired KB Content Disclaimer

This 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.


This article explains how to use the DCOM configuration utility DCOMCNFG.EXE to configure DCOM for remote client/server applications created using Microsoft Visual Basic 5.0.

Incorrectly setting up security for DCOM client/server applications will typically result in the following errors:

Run-time error '429'
ActiveX component can't create object.
Run-time error '70'
Permission denied.

This article does not discuss the settings required to enable client access through firewalls. Please contact Microsoft Technical Support to obtain assistance regarding firewalls, proxy servers, or domain controllers.

More Information

The following settings will enable Windows NT or Windows 2000 to communicate with an NT or Windows client and back (assuming that there are no firewalls or proxy servers involved).

To configure your Visual Basic DCOM "Server" on an NT or Windows 2000machine, follow these steps: (Note that DCOMCNFG will only show servers that are EXEs. It will not show DLL servers.)

  2. From the Applications tab, select the DCOM Server application (which will be represented by its ProgID - a friendly name, such as "Your DCOM Server") or by its CLSID (a GUID - Globally Unique Identifier) such as {5BD7512F-3F2B-11D0-B4D2-02E0C911A7B1}).
  3. Double-click the Server application or click the Properties button to view the properties of the server application.
  4. Select the Security Tab.
  5. Make the following changes:

    IMPORTANT: The following changes will allow anyone at all to launch the server. These settings are just for getting the servers up and running in development mode for debugging purposes. They are not intended for specific DCOM security on a target platform distribution.

    Everyone -allow access
    System -allow access
    Interactive -allow access

    Everyone -allow launch
    System -allow launch
    Interactive -allow launch

  6. Select the Identity Tab, and then select "The Interactive User."
  7. Click OK, and then click OK again.
If your DCOM server is raising events to your clients or using client callbacks, then you will also need to make the following changes to the default settings for your NT or Windows 2000 'Server' machine:

On the NT or Windows 2000 SERVER machine:

  1. Using DCOMCNFG.EXE, select the Default Properties Tab.
  2. Set the Default Authentication Level to "None."
  3. Set the Default Impersonation Level to "Identify."
NOTE: Make sure you test your DCOM application where the client and the server are running under different user accounts.

If your application works at this point, then you should not need to make any configuration settings on the client machines.

If your client is receiving events raised from the server or has enabled the server to call it back, then the following steps might be necessary, depending upon your specific network:

To configure your Visual Basic DCOM "Clients:"

On the NT or Windows CLIENT machines:

  1. Using DCOMCNFG, select the Default Properties Tab.
  2. Set the Default Authentication Level to "None."
  3. Set the Default Impersonation Level to "Impersonate."
On the WIN95 CLIENT machines (if receiving events):

  1. Using DCOMCNFG.EXE, select the Default Security Tab.
  2. Click Edit Default.
  3. Grant Access to "The World" user.
Modifying and setting security settings should be done with caution and awareness. Before modifying security settings, be sure that you understand the security implications involved. The above client settings are only necessary in certain network situations and can be added via setup code to the clients registry. For more information about writing such code see the References section later in this article.

NOTE: DCOM registry keys are intended for Legacy software and not for Proprietary software or programming convenience.


For more detailed information regarding DCOM security settings, please see the following articles in the Microsoft Knowledge Base:

176799 : INFO: Using DCOM Config (DCOMCNFG.EXE) on Windows NT

182248 : How To : Use DCOM Config (DCOMCNFG.EXE) on Windows 95

For more information regarding using WIN95 as a DCOM server, please see the following article in the Microsoft Knowledge Base:

165101 : How To Use Windows as a DCOM Server

Visual Basic 5.0 can use remote events callbacks to enable two-way communication between DCOM clients and a DCOM server application.

For more information regarding using remote events or callbacks with DCOM and Visual Basic 5.0, please see the following article in the Microsoft Knowledge Base:

175510 : FILE: VB5DCOM.EXE: Using Callbacks and WithEvents with DCOM
(c) Microsoft Corporation 1998, All Rights Reserved.
Contributions by Randy Russell, Microsoft Corporation

Article ID: 183607 - Last Review: Jun 29, 2004 - Revision: 1