Remote connection failure|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Remote connection failure
Avatar
Dustin VanKeuren_2
Member
Members
Forum Posts: 4
Member Since:
02/29/2024
sp_UserOfflineSmall Offline
1
02/29/2024 - 07:38
sp_Permalink sp_Print sp_EditHistory

Trying to connect to a remote OPCDA server and getting the following error:

System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘OpcRcw.Comn.IOPCServerList2’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{9DD0B56C-AD9E-43EE-8305-487F3188BF7A}’ failed due to the following error: A security package specific error occurred. (Exception from HRESULT: 0x80070721).

 

I am using the following apis:

OpcNetApi – 2.1.108

OpcNetApi.Com – 2.1.108

OpcComRcw – 2.1.109.57

Application: 32 bit, .Net 4.8 (and using the appropriate OPC libraries for this version)

 

Connection works fine using OPC Quick Client to the same remote OPC Server.

Avatar
Randy Armstrong
Admin
Forum Posts: 1578
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
02/29/2024 - 13:47
sp_Permalink sp_Print

Do you have CoreComponents installed with OpcEnum running?

Are you using an x64 client build? Have you tried compiling to x86?

Avatar
Dustin VanKeuren_2
Member
Members
Forum Posts: 4
Member Since:
02/29/2024
sp_UserOfflineSmall Offline
3
03/01/2024 - 08:08
sp_Permalink sp_Print

Do not have core components installed on the client computer.

OPCenum is only for the OPC server.

The test client application is x86

I ran the test client locally on the server running the OPC server as a test and it was able to connect.

As I mentioned, Kepware’s Quick Client connected to the remote OPC server just fine.

Avatar
Randy Armstrong
Admin
Forum Posts: 1578
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
03/03/2024 - 04:15
sp_Permalink sp_Print

IOPCServerList2 is a call made to OpcEnum.

It needs to be installed.

Try installing core components.

Avatar
Dustin VanKeuren_2
Member
Members
Forum Posts: 4
Member Since:
02/29/2024
sp_UserOfflineSmall Offline
5
03/04/2024 - 08:15
sp_Permalink sp_Print sp_EditHistory

OPCEnum is installed as I have KepserverEX installed.

 

Installed the core components, still getting the same error.

The server running the OPC server may be running an older version of the core components.

… After updating the core components on the server side I now get:

The COM server does not support the interface ‘OpcRcw.Da.IOPCServer’

Tried both 32 and 64 bit builds.

Still want to know why the OPC Quick Client can connect just fine.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 25
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1444
Posts: 4887