Cannot Browse for OPC Servers on Remote Computer

Symptom

When an OPC client application is unable to find the OPC server, users receive an error informing that the OPC client application cannot obtain the Class ID (CLSID) of the OPC server. Depending on the software product in use, this error may appear in different formats as follows:

  • CLSID not found in Registry
  • OPC Server CLSID not found in Registry
  • Cannot browse for OPC Servers on remote machine
  • Unable to connect to the data source, COM error
  • Failed to initialize Server Object. Invalid Class String
  • Failed to obtain a valid CLSID for server [OPC Server name]
  • DCOM error for CLSID 13486D44-4821-11D2-A494-3CB306C100000
  • Unable to find any OpcEnum server on; CLSID returns 800706BA

 

Cause

This error displays in the OPC client application when it fails to find the OPC server. The two most common causes are the following:

  • Failure to find the OPC server in the Windows registry
  • Failure to connect to OPCENUM.EXE

The inability to establish the first connection with an OPC server is both the first and most common error encountered when using OPC. When an OPC client application tries to connect to an OPC server, the OPC client application must be able to identify the correct application (OPC server) to which it will connect. Each OPC server is identified by a Class ID (CLSID).

Most of the OPC client applications attempt to display a list of available OPC servers on the target computer. This process is called browsing, and is the process whereby the OPC client application is able to view the OPC servers installed on the remote computer.

When the OPC client performs a browse, it actually connects to a copy of OpcEnum, which resides on the remote computer, and retrieves the list of available OPC servers. This list includes the ProgID (human friendly name) and the CLSID (the numerical identification) of each OPC server.

The OpcEnum is used to browse for OPC servers that are located on the same computer as OpcEnum.

At this point, the OPC client does not actually connect to the OPC servers directly. Consequently, the retrieval of the list is independent of the state of each OPC server and whether or not it is operational.

If for any reason the OPC client application is unable to find the CLSID, it will not be able to connect to the OPC server and use any of the messages previously described (see Symptom, above).

 

User Authentication Issues Repair Procedure

It can happen that you are not authenticated on the remote computer. If Windows does not recognize your user account, it will reject your entry immediately without attempting a connection to the OPC server. Such scenario may occur in at least a couple of circumstances.

  • The user account does not exist on the remote machine.
    • If you are attempting entry from a Windows domain to another, then you must either establish a domain trust, or add your user account to both the Windows domains.
    • If you are using a workgroup, you must add the user account to the remote computer. Ensure that you use the same spelling for the user name. Also ensure that you use the same spelling and capitalization for the password. Finally, ensure that each user account has a password. The remote authentication requires you to have a user name and a password. If the user account does not have a password, the authentication will fail. Note that if you are using a single Windows domain, this problem will not occur.
  • Simple File Sharing is turned on.
    Simple File Sharing strips the username and password from requests coming in from remote computers. As a result, users will not be able to authenticate properly.
    To turn off Simple File Sharing, do the following:
  1. In the Windows search box on the taskbar, enter Local Security Policy.
  1. Press ENTER.
    NOTE: You can also open the window by starting the Run dialog box, entering secpol.msc, and clicking OK.
  • The Local Security Policy window
  1. Under Security Settings, expand Local Policies, and then select the Security Options folder.
  1. Search for the Network access: Sharing and security model for local accounts option and set to Classic - local users authenticate as themselves.

 

OpcEnum is not Installed Repair Procedure

The OPC Foundation is responsible for creating and maintaining OpcEnum. OpcEnum is typically installed when you install an OPC client or OPC server. However, this is not always the case: it is possible that a computer does not have a local copy of OpcEnum installed.

OpcEnum is only able to browse for OPC servers on the machine on which it is running. Therefore, OpcEnum cannot perform a browse on remote computers. So, even if a copy of OpcEnum is present on your computer, you will not be able to browse the remote computer.

Use Windows Explorer to determine if OpcEnum is installed on the computer you want to browse. The file name is OpcEnum.exe. If OpcEnum is not installed, you need to install it. OpcEnum is available as a free application from the OPC Foundation (https://www.opcfoundation.org).

 

OpcEnum is Disabled Repair Procedure

Even if OpcEnum is installed on the remote computer, it must be able to start, otherwise the communication will fail. If Startup Type for OpcEnum is set to Disabled, Windows will not be able to start OpcEnum. You must enable OpcEnum.

To check the startup type for OpcEnum, proceed as follows:

  1. Click the Windows Start button, and then select Control Panel.
  1. In the Control Panel window, select Administrative Tools, and then double-click Computer Management.
  • The Computer Management window for the local computer displays. Computer Management (Local) displays as the root of the console tree.
  1. In the console tree, expand Services and Applications, and click the Services container.
  1. In the right window pane, search for OpcEnum.
  • If OpcEnum is not in the list, this means that it is not installed. In this case, see OpcEnum is not Installed Repair Procedure, above.
  • If the Startup Type for OpcEnum is already set to either Manual or Automatic, see Anonymous Logon Access not Given Repair Procedure, below.
  • If the Startup Type is set to Disabled, the OpcEnum is indeed disabled and you must enable it.
  1. To enable OpcEnum, do the following:
    a. Right-click OpcEnum and select the Properties option.
    b. In the Startup Type drop-down list, select Manual.
    Even though it is also possible to select the Automatic setting, it is recommended to select Manual so that OpcEnum will be executed only when required.

Now that the startup type for OpcEnum is properly set, try to browse the remote computer again. If it still does not work, see the next procedure.

 

Anonymous Logon Access not Given Repair Procedure

By default, OpcEnum requires anonymous logon access on the OPC server computer to work properly. If you do not provide this access, no one will be able to connect to OpcEnum and browse the computer. It may happen that this access was overlooked during the setup. This means that you must add the anonymous logon access control entry (ACE) as follows:

  1. In the Windows search box, enter DCOMCNFG.
  • The DCOM configuration process is initiated.
  1. In the Component Services window, under Console Root, expand Component Services, and then expand the Computers folder.
  • My Computer is in the Computers folder.
  1. Right-click My Computer and select Properties.
  1. In the My Computer Properties dialog box, select the COM Security tab.
  1. In the Access Permissions section, click Edit Limits.
  1. Add Anonymous Logon and enable Local and Remote Access.
  1. Click OK.