Home Features
& Benefits What Is OPC Free Demo Purchasing Sample Code 
 & Support

DCOM Tutorial - Intro to the DCOMCNFG.EXE Utility
DCOM Tutorial Home

What is DCOM Config (aka "DCOMCnfg")?

To get DCOM to work right, you've probably heard there are a lot of registry settings. Although this sounds intimidating, the DCOM Config utility makes things a lot easier because it lets you use a point-and-click interface to get at the various types of settings and it takes care of the "dirty work" for you.  We've spent time learning what entries it makes where and learning the "nuts and bolts" so you don't have too.

So where is the DCOM Config Utility on my computer?

As with many of Microsoft's most useful utilities, no icon or menu item is provided to indicate the existence of the DCOM Config utility, but it's there. It should be installed in your \Winnt\System32 directory on either NT or 2000 and the file is named DCOMCNFG.EXE.  The easiest way to launch it is to choose the Run option from the Windows Start menu, and type (or browse for) DCOMCNFG.EXE, then click OK to run it.  You should not have to type the whole path - we don't on our machines which have a standard NT/2000 load.

DCOm Config Applications TabWhat does the DCOM Config Utility Look like?

When you first launch the utility, it will look like the screen at the right. Don't be surprised if launching it takes 5 to 10 seconds. When DCOM Config launches, it goes out and finds all the COM servers on your computer, not just OPC servers but any object that is setup to function as a COM object and provide services to other applications.

Major parts of DCOM Config

  • There are 4 main tabs in the DCOM Config utility.. Get to know them by name as we will be very specific in our terminology in the client setups and server setups.
     
  • Applications Tab - shown here, this tab is used to make settings for a specific COM server, including a specific OPC server. Settings you make here may override settings you make on the "Default" tabs below.  There are also a couple of important settings not covered by the "Default" tabs that you will make for your OPC server here when we do the server side setups. You pick the server you want to set from the list and click on the "properties" button to bring up server specific settings.  If you wonder why you see some big long alphanumeric strings for some servers -- that's because the server vendor did not include a "Friendly name" for their COM server when they installed it on the machine.  This might be because they do not want people changing the settings unless they know what they are doing, or because they just didn't cover all the details. Most OPC servers we have seen have a "friendly" name, including OPC servers sold by Software Toolbox.
     
  • Default Properties - (picture)on this tab you setup whether DCOM is even enabled and you tell the operating system how you want it to authenticate who (i.e. what users and groups of users) you will let connect.  This tab doesn't name specific users, it just specifies the method of determining who has access.
     
  • Default Security - (picture) on this tab is where you say who has access if nothing else is specified on the Applications tab. We recommend that you get these settings right and only use server specific settings on the Applications tab if you must.  It makes life much easier if you have multiple OPC servers and clients if you get this right.
     
  • Default Protocols - (picture) on this tab you tell DCOM which of the installed network protocols to use and in what order. How you have this set can drastically affect timeouts. DCOM will try all available protocols in the order set on the Default Protocols tab before it finally times out. Trust us, too many protocols and you'll have a long wait.  Our normal recommendation is that you have "Connection Oriented TCP-IP" on the top of the list on this tab and remove the other protocols unless you have a good reason to use them.

How should I use DCOM Config ?

There are 3 major things that you may need to set with DCOM Config

  1. Your OPC client machine's settings (more info) to allow the OPC server to have Access Permissions to send data back upon subscription/exception
  2. Your OPC server machine's settings (more info) to allow desired OPC clients to have Access and Launch Permissions on that machine and to the desired OPC servers so that they can connect to the OPC server(s) on your machine and get data from them, and if necessary, launch them if they are not already running.
  3. On your OPC server machine (more info), setup the COM server OPCEnum so that remote clients can connect and browse (get a list) for available of OPC servers on the OPC server computer.

Things to remember when using DCOM Config

  • If you change Access or Launch Permissions on the client side, you will need to restart your client side application.  If you are using a VB program and are in VB development mode - you will need to restart VB - just stopping and restarting your VB application from debug to run mode will not cause security on the application be reinitialized with the new settings.
  • Likewise, if you change Access or Launch Permissons on the OPC server side either through the Default Security tab or from the Applications tab, you will need to restart the server side application for the changes to take effect..
  • If you change anything on the Default Properties or Default Protocols tab, we recommend you reboot the computer before assessing if the changes took effect.
  • Once you get your DCOM Config settings right, you should not have to change them again.
  • Document your settings carefully - make screenshots if you want and paste them into a Word document. Proper and organized documentation of how you have your machine setup can be a lifesaver if you have to reload a machine in an emergency (i.e. drive failure, hardware failure, etc).

DCOM Config Screenshots - provided as a reference for the above descriptions.

Default Properties Tab

Default Security Tab

Default Protocols Tab

 

Warning: contents of this tutorial are Copyright Software Toolbox, Inc. 2001-2002, and may not be reproduced in electronic or written form without written permission of Software Toolbox Inc.  Anyone found copying copyrighted material from this site for use on another site will be prosecuted.  You are welcome to link to this site from your site. The information in this article is accurate to the best of our professional judgement at the time of writing but is subject to change.

Copyright Software Toolbox, Inc., 1996-2002, All Rights Reserved Worldwide.
148A East Charles Street, Matthews, North Carolina, USA 28105
Phone: 704-849-2773 or 1-888-665-3678 (US), Fax: 704-849-6388
Business hours - Monday to Friday, 8 AM to 5 PM EST (GMT-5)