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.
Attachment STBOX.pdf not found