Professional OPC
Development Tools

logos

error code -2147024891 (0x80070005)

More
26 Dec 2016 17:47 #4724 by support
Hello.

There is obviously nothing wrong with your code as such. The exception is for "Access is denied", I can therefore only suggest trying other combinations of the parameters you have at the beginning, and further experimenting with the DCOM configuration.

Also, what kind of project is your application? E.g. desktop - Windows Forms, WPF, console app. Or a Windows Service, Web app, or Web service, or something else? This can have some influence due to the way the COM/DCOM is initialized inside the process.

Thank you

Please Log in or Create an account to join the conversation.

More
26 Dec 2016 17:41 - 26 Dec 2016 17:42 #4723 by support
From: p.
Sent: Thursday, December 22, 2016 1:47 PM
To: [...]
Subject: RE: QuickOPC Download Form - [...]

Dear Sir,

I am currently evaluating QuickOPC. [...]

I am having problems connecting with quickopc to an OPC-DA server in our local network, and I don’t seem to find out how to solve it.

Using 2 other tools (OPC Quick client from KEPWare, and kassl dOPC explorer) I can successfully connect to our network OPC server and read/write items.
However when I try to connect using QuickOPC controls in C#, I am getting an exception.

The code I am using is:
            EasyDAClient.SharedParameters.ClientParameters.UseCustomSecurity = false;
            EasyDAClient.SharedParameters.ClientParameters.TurnOffActivationSecurity = true;
            EasyDAClient.SharedParameters.ClientParameters.TurnOffCallSecurity = true;
 
            EasyDAClient client = new EasyDAClient();
            client.ReadItemValue("gradera2", "Marelec.Grader", "grader.curProg");
When running this code, I get this exception:
OpcLabs.EasyOpc.OperationModel.OpcException: An OPC operation failure with error code -2147024891 (0x80070005) occurred, originating from 'OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient'. The inner exception contains details about the problem. 
 
---> System.UnauthorizedAccessException: Access is denied. 
 
   --- End of inner exception stack trace ---
   at OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient.CheckOpcResult(CHResult* hResult)
   at OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient.InternalBrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.ForwardingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.ForwardingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.ForwardingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.PSBoxingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.EasyDAClientCompositor.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.CompositeEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.ForwardingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Internal.LicensingEasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.EasyDAClient.BrowseNodes(ServerDescriptor serverDescriptor, DANodeDescriptor parentNodeDescriptor, DABrowseParameters browseParameters)
   at OpcLabs.EasyOpc.DataAccess.Browsing.DANodeBrowseable.BrowseLeaves(Object parentNode, Object nodeFilter, IEnumerable`1& leaves, IEnumerable`1& exceptions)
Shortly after I get this error, my visual studio 2015 also crashes. Is there way to find out exactly what is causing this behavior, and how to solve it ?
Do I need to setup dcomcnfg or windows firewall specifically for quickopc controls ?

Best regards,
P.
Last edit: 26 Dec 2016 17:42 by support.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.176 seconds

      

 Recommend this on Google