I am trying to connect remote OPC server from client using C#. I got Interop.OpcAutomation.dll from OPC foundation and it worked very nicely with local opc server, but when comes to connect remote opc server it somehow shows Access denied (HRESULT: 0x80070005 (E_ACCESSDENIED)).
Here is code:
this._reqServer = new OPCServer();
this._reqServer.Connect("OPC.SimaticNET.1", "MachineName"); //Here it throws exception
So here what I already tried:
- Configured the permission in DCOM in MyComputerProperties and OPCEnum.
- I checked with third party clients such as OpcQuickClient and it can able to access the remote opc server from the same client, which forces me to come to the conclusion that configuration at server side is OK.
So anyone has tried to make some C# client which can access remote opc server, Please tell what more needs to done??