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.

ReadMultipleItems - Failure: OPC NET API error - result ID: E_NETWORK_ERROR;

More
22 Jun 2023 07:01 #11837 by support
Hello.
You have a console application right?

If so, we will try easier steps, before we proceed to using AssureSecurityInitializationAndRunOnStaThread .
I apologize for changing the approach, I have not realized all consequences upfront.

Please do this:

1. Is there an [STAThread] attribute on the program's main method?
2. If yes, remove it.
3. Put an [MTAThread] attribute on the main method.
4. Build and run the program again. Has anything changed (does it still give the error)?
5. Check the Windows Event Log. Is the same event still there?
6. If the error is still there: Add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method (this is an easier one - no arguments - just call it is it is).
7. Build and run the program again. Has anything changed (does it still give the error)?
8. Check the Windows Event Log. Is the same event still there?

Thank you

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

More
22 Jun 2023 00:54 #11836 by yong
Hello,
could I possibly get an example of using the AssureSecurityInitializationAndRunOnStaThread method?
I would like to hear a brief explanation of how to use it.
I'm having a hard time understanding from the content of the provided link. (opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User's...lizationAndRunOnStaThread.html)

Thank you.

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

More
21 Jun 2023 12:29 #11831 by support
Hello, and thank you.

It is important to know about this event, but it does not necessarily imply a problem. It just tells us that in the current state of things, many DCOM-related settings inside your app will be ignored, because "something" had initialized the COM security before we had a chance to do it.

I should say that this is complicated matter - and that is still an understatement.

Please read the following article to get some basic idea: kb.opclabs.com/COM_management
and have at least a brief look at kb.opclabs.com/COM_settings_in_OPC_Classic_client_components to get an idea of what we are dealing with.

I suggest to upgrade to version 2023.1, *and* encapsulate all your app code by a call to AssureSecurityInitializationAndRunOnStaThread method (opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User's...lizationAndRunOnStaThread.html ). Even if that does not directly resolve the issue, it should at least get rid of the error in the event log, allowing us to experiment with the DCOM settings from inside the application.

Best regards

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

More
20 Jun 2023 08:29 #11822 by yong
Hello.

I have uploaded the Windows log you requested.


What seems to be the problem?


Thank you.
Attachments:

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

More
19 Jun 2023 13:15 #11820 by support
Hello, thank you for the details.

Can you please start Windows Event Viewer, then select Event Viewer (Local) -> Windows Logs -> Application, and check if there are events around the time the program was started and the first time the error occurred afterwards? If there are such events, please post them here.

Thank you

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

More
19 Jun 2023 02:23 #11818 by yong
Hello,
I will update the version to the latest one, 5.7.1.

Here are the answers to your questions:

1. I will check on that.
2. There were no changes to the source code, only the version mentioned below was updated.
3. It is a WPF project.
4. I am targeting .NET Framework.
5. I'm using the EnableNativeClient = false setting because when I had an issue with remote connection in the past and asked about it, I was advised to try this setting. Once I did, the remote connection was established, so I've continued to use this setting.

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

More
15 Jun 2023 13:14 #11809 by support
Hello.
Yes, this is almost certainly related to DCOM security.

I have earlier suggested an update to a current version (which is now 5.71). Please do it at the first opportunity, because we cannot reliably support older versions.

I have some additional questions:

1. Which operating system is running on the client and server side? Could they be affected by support.microsoft.com/en-us/topic/kb5004442-manage-changes-f...52-c141-43d2-941e-37ed901c769c ?

2. Has it been working before, and only stopped working at some date? Or was the only difference the version change you mentioned?

3. What type of project are you building in VS? Such as Console app, Windows Forms app, Windows service, Web service, etc.?

4. Are you targeting .NET Framework or .NET Core/.NET 6+?

5. Is there a specific reason for having the EnableNativeClient = false setting?

Best regards

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

More
15 Jun 2023 06:24 #11808 by yong
Hello. I'm continuing with my previous inquiry.
I've added more logs for error tracking, and I found that the 'CoCreateInstanceEx: Access is denied' error is occurring.
Could this be a DCOM error?
Do you have any solutions for this issue?



Attachments:

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

More
25 Jan 2023 02:11 #11455 by yong
Hello

I can't test it because I withdrew from the site. We will test later and contact you again.

Best regards

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

More
18 Jan 2023 07:26 #11445 by support
Hello.
I need some additional information:

1. The [...] in the error message indicates that are are more lines to the message. Please get the full message (Message property of the Exception object in the result object). And, and if there is .InnerException inside that exception, also the Message of that InnerException, and so forth.

2. 5.63.246 is not the current version. The current version is 5.70. Please test with it and report what the results are.

Best regards

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

Moderators: support
Time to create page: 0.064 seconds