I'm partly developing opc client application using opc.net api and I have some trouble connecting remote opc server. Below please see the code I wrote to connect to opc server.
Opc. URL url = new Opc. URL ( "opcda://network-pc/some-opc-server" );
Opc.Da. Server server = null ;
OpcCom. Factory fact = new OpcCom. Factory ();
server = new Opc.Da. Server (fact, null );
server.Connect(url, new Opc. ConnectData ( new System.Net. NetworkCredential ()));
After executing this code I am getting error: System.Runtime.InteropServices.ExternalException: CoCreateInstanceEx: Access is denied.
In addition, both computers are in the same local network, and I can connect to opc server from my computer using third party opc clients.
Is there anybody who faced with this kind of issue? Thanks in advance.