titanium-as / TitaniumAS.Opc.Client

Open source .NET client library for OPC DA
MIT License
197 stars 93 forks source link

Exception: CoCreateInstanceEx: Class not registered #64

Open avnet78 opened 2 years ago

avnet78 commented 2 years ago

I am getting CoCreateInstanceEx: Class not registered Exception. Here's how I am trying to initialize the opc server:

Please advise.

var opcServerName = "FactoryTalk Gateway";
var opcServerIP = "192.168.200.7";

Uri url = UrlBuilder.Build(opcServerName, opcServerIP);

using (var server = new OpcDaServer(url))
{
  // read opc tags
}
duduyoyo commented 4 months ago

Why bother with COM exception if there exists a simple and straightforward solution? That will make your life easier, I believe.

jklemmack commented 4 months ago

@avnet78 Did you ever get past this? I was able to by using the ClsId of the server, but the "name" property wouldn't work for me.