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.

HRESULT: 0x80040202 when Subcribing to multiple Items

More
11 May 2021 16:28 #9668 by jgonzalez
Thank you,

I will make sure to keep you updated if anything comes up.

Really appreciate the support.

Best regards,

John G.

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

More
11 May 2021 07:21 #9665 by support
Thank you, glad to hear the good news.

Note: Although the API remains the same with this, parts of the internal implementation are significantly different. Compared to what you are used to, there can be different in behavior details (such as error messages), or some "new" bugs,. If the customers spots anything that does not feel right, I would be interested to know about it. Eventually, this setting may become a default.

Best regards

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

More
10 May 2021 21:10 #9662 by jgonzalez
Hello,

Thank you for your input, the customer's issue was resolved following your instructions.

Best regards,

John Gonzalez

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

More
30 Apr 2021 18:24 #9634 by support
Hello,
can you please try the following?
  • Upgrade, at least for the purpose of the test, to 2020.3, or even better, 2021.1. This brings in a different internal implementation of the low-level OPC DA code. Our normal implementation is written in C++, this new one is in pure .NET (it has been put in for .NET Core).

  • In the user's code, after every instantiation of EasyDAClient (similar to "var client = new EasyDAClient();"), put this statement:
client.InstanceParameters.EnableNativeClient = false;

This will force the usage of the new implementation.

The hope is that the new implementation behaves much more in line with other OPC DA clients.

Best regards
The following user(s) said Thank You: jgonzalez

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

More
29 Apr 2021 16:44 #9631 by jgonzalez
Hello,

The customer is using:

- OPC Data Client 2020.2
- Windows 10 (x64)
- Visual Studios 2017 Pro V15.9.34
- C#.Net
- .NET Framework 4.7.2

The Customer is receiving Error: 0x80040202 when he tries to subscribe to multiple items from a remote OPC Server (KEPServer LinkMaster v3). The customer also tested with OPC Expert Client and was able to browse and subscribe to Multiple items successfully.

The Customer is able to run the code locally and received good values from the OPC Server. We believe that DCOM is properly configured since he was able to successfully connect and subscribe using the OPC Expert tool.

Here are some things we have already tested:

- We asked the customer to download and installed our OPC Client tool (OPC Quick Client), connect to the OPC Server, add a group, browse and add items, perform subscription and test synchronous and asynchronous reads. Everything was successful.

- Next we had the customer use the EasyOpcNetDemo Application for the same outline of test as above. He was able to connect to the OPC Server, read and write to the tags but performing a subscription it resulted in "Exception from HRESULT: 0x80040202" in the exception box.

-Next we asked the customer to change the Platform Target to (x86) instead of the default "Any CPU" and to recompile his application. We have seen other users run into situations where 32-bit OPC Servers only allow 32-bit OPC Clients to subscribe. Quick Client and OPC Expert are likely 32-bit. Unfortunately the result was the same as the second test. (HRESULT:0x80040202)

- Finally we had the customer implement the three lines of code below to the beginning of the his code and to test every combination of TRUE/FALSE until one worked. We have recommended this solution to users experiencing OPC Date Client-OPC DA connectivity issues in the past. Unfortunately all combinations were not successful, I have attached a file with the results of each combination.

EasyDAClient.SharedParameters.ClientParameters.UseCustomSecurity = False
EasyDAClient.SharedParameters.ClientParameters.TurnOffActivationSecurity = False
EasyDAClient.SharedParameters.ClientParameters.TurnOffCallSecurity = False


I am afraid that after all that, we are out of ideas. I would really appreciate if you could provide some input that can guide us on the right direction.

Thank you.

John G.

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Attachments:

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

Moderators: support
Time to create page: 0.080 seconds