Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Access is denied

More
31 Aug 2018 09:05 #6628 by support
Replied by support on topic Access is denied
The DCOM settings for OPC are complex. A common mistake is just to allow the OPC server be accessible by the client. The OPC communication is bi-directional (OPC Server makes callbacks to the OPC client), and therefore the OPC server must also have access to the OPC client.

What you have described is a symptom of the fact this reverse direction does not work well. In such case, OPC calls like Browse, synchronous Read/Write etc. work well, but asynchronous operations and subscriptions don't.

Setting up DCOM for OPC is challenging. I do not think there is a general procedure that will assure things will always work, because systems differ in OS versions, authentication methods, user account being used etc. I suggest you Google for the information, or one such document is here: www.opclabs.com/forum/com-connections/1345-dcom-for-opc-configuration-tutorial#1796 .

Best regards

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

More
30 Aug 2018 21:07 #6627 by MarkusZ
Replied by MarkusZ on topic Access is denied
Thank you very much for your help, by setting the three following parameters to true we got our first success:

EasyDAClient.ClientParameters.UseCustomSecurity = true
EasyDAClient.ClientParameters.TurnOffActivationSecurity = true
EasyDAClient.ClientParameters.TurnOffCallSecurity = true

Now we can read and write OPC Items.


But we still run into another Problem:
We are using the ItemChanged Event to get informed about changes on the server side. It’s done by the following line of code:
opcClient.ItemChanged += WhenOpcItemChanged;
opcClient is of type: EasyDAClient

In the event handler “WhenOpcItemChanged”, first of all we check the parameter “EasyDAItemChangedEventArgs”.

The property “Exception” of this parameter gives us the information: “Access denied” ({[ItemId="General.DataPump.Data"] *** System.UnauthorizedAccessException: Access is denied. })

So it seems that the way from our client to the server works fine, but as soon as the server would like to give back some information (in this case about the item “General.DataPump.Data”) we are running into a access denied failure.

So obviously a security problem again.

Maybe we have to add an additional user to the DCOM security as well.
Can you tell us which users are necessary to have DCOM rights?

All tests are done with the Version 2018.2!

Thank you so much,
Markus

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

More
29 Aug 2018 14:37 #6625 by support
Replied by support on topic Access is denied
Regarding the "Access denied": If other OPC clients on the same machine can connect, please try various combinations of settings like UseCustomSecurity (and 2 more), as described here: www.opclabs.com/forum/connections-reconnections-com-dcom/124...ng-to-remote-machines-via-code .

Best regards

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

More
26 Aug 2018 16:42 #6620 by support
Replied by support on topic Access is denied
Hello,

Version 5.2x may work on Windows 10. It's just that we do not really know - it has been developed earlier, and we do not go back to earlier versions to verify their functionality with systems they were not tested with originally.

I will reply to the second part of your question later - please be patient.

Best regards

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

More
24 Aug 2018 13:48 #6619 by MarkusZ
Access is denied was created by MarkusZ
We are using QickOPC 5.2 - but this will not work on Windows 10 - right?
So we have tu upgrade onto a newer Version.

We have been testing QuickOPC 2018.2. but we cant get running the demo application.

We can get access to the server class, but as soon as we press the button "Browse items" we will get the "Access is denied" error. See the two screen shots added onto this topic.

Our Network Administrator told me, that according to documentation COM/DCOM is configured correctly.

Also another program on the same machine, which also communicates via OPC (but not via your product) can access the same Server Class without problems.

Can you please give us a hint, where we could focus on to get your demo application running? Thats important for us to make the upgrade decision.

Thank you very much,
Markus
Attachments:

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

Moderators: support
Time to create page: 0.091 seconds