OPC DA: Unable to cast COM object of type 'System.__ComObject' to interface type 'OpcRcw.Comn.IOPCServerList2'|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
OPC DA: Unable to cast COM object of type 'System.__ComObject' to interface type 'OpcRcw.Comn.IOPCServerList2'
Avatar
Jared Beach
New Member
Members
Forum Posts: 2
Member Since:
11/05/2014
sp_UserOfflineSmall Offline
1
02/24/2017 - 16:07
sp_Permalink sp_Print

I am trying to connect to an instance of Graybox Simulator on a server, but it is failing with the following message:

 

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: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). at Opc.Server.Connect(URL url, ConnectData connectData) at Opc.Da.Server.Connect(URL url, ConnectData connectData) at Opc.Server.Connect()

 

Server info:

Windows Server 2012 R2 Standard

64-bit Architecture

 

URL I'm trying to connect to:

"opcda://localhost/Graybox.Simulator"

 

I can browse the OPC server just fine using Matrikon OPC Explorer:

MatrikonImage Enlarger

I've tried playing with the DCOM settings. I've tried installing, uninstalling, and re-installing multiple versions of .NET API Redistributables and Core Components.

 

Running out of ideas. 

 

Any suggestions?

 

Thanks.

Avatar
Randy Armstrong (Sparhawk)
Member
Members
Forum Posts: 20
Member Since:
05/12/2015
sp_UserOfflineSmall Offline
2
03/05/2017 - 08:10
sp_Permalink sp_Print sp_EditHistory

Greybox obviously does not support the new IServerList2 interface.

There should be an option that forces the API to use the old IServerList interface but I can't recall at the moment.

Avatar
Jared Beach
New Member
Members
Forum Posts: 2
Member Since:
11/05/2014
sp_UserOfflineSmall Offline
3
03/06/2017 - 07:53
sp_Permalink sp_Print

Randy said
Greybox obviously does not support the new IServerList2 interface.

There should be an option that forces the API to use the old IServerList interface but I can't recall at the moment.  

Thanks Randy. Not sure exactly what the problem was, but I fixed it by installing another version of OPC redistributables.

 

See my stackoverflow comment: link

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