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:

 

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:

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.

  1. In the Windows search box on the taskbar, enter Local Security Policy.
  2. Press ENTER.
    NOTE: You can also open the window by starting the Run dialog box, entering secpol.msc, and clicking OK.
  3. The Local Security Policy window
  4. Under Security Settings, expand Local Policies, and then select the Security Options folder.
  5. 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.
  2. In the Control Panel window, select Administrative Tools, and then double-click Computer Management.
  3. The Computer Management window for the local computer displays. Computer Management (Local) displays as the root of the console tree.
  4. In the console tree, expand Services and Applications, and click the Services container.
  5. 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.
  6. 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.
  2. The DCOM configuration process is initiated.
  3. In the Component Services window, under Console Root, expand Component Services, and then expand the Computers folder.
  4. My Computer is in the Computers folder.
  5. Right-click My Computer and select Properties.
  6. In the My Computer Properties dialog box, select the COM Security tab.
  7. In the Access Permissions section, click Edit Limits.
  8. Add Anonymous Logon and enable Local and Remote Access.
  9. Click OK.