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.

Certificate WinForms in Net Core

More
14 Oct 2022 10:50 #11155 by Ureña
Hello I understood what happened.
In windows services I have the opc fundation folder embedded in it but in winforms this not happens so i have to go to the output folder as you said <project directory>/bin/Debug/net6.0-windows and then opc fundation folder to work on it is there!

Thanks you, it's solved

Regards
The following user(s) said Thank You: support

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

More
14 Oct 2022 07:59 #11154 by support
Hello.

The code inside QuickOPC that deals with certificate folders does not distinguish whether it runs as Windows Service, or in Windows Forms, or in some other host.

I have done a quick test:
1. Simply created a new Windows Forms project under .NET Core 3.1/.NET 5+.
2. Added a button to the main form.
3. Added a code that reads a value from an OPC UA server and shows it in a message box (from www.opclabs.com/products/quickopc/opc-specifications/unified-architecture/generic-data ).

After running the program and pressing the button, it immediately creates a following directory structure under the directory where the program executable is (in my case, <project directory>/bin/Debug/net6.0-windows):
\---OPC Foundation
    \---CertificateStores
        +---MachineDefault
        |   +---certs
        |   \---private
        \---UA Applications
            \---certs

There would be more folders if a secure connection was actually in use.
Are you sure you are looking at the right place?

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

More
13 Oct 2022 07:55 #11153 by Ureña
I know that the location is different, as i said, for example in windows services, the folder OPC Fundiation is created automatically in the working folder, so in the winforms it's not done automatically, so i have to create it manually in my project? then the certificate when i connect with the plc will appears automatically in the rejected folder or how?
Do you have any manual or tutorial to how to certificate in Winforms using Net core?

Thanks you

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

More
10 Oct 2022 14:24 #11142 by support
Hello,

I think there are two issues at play:

1. QuickOPC does not currently have any Windows Forms features under .NET Core/.NET 5+. This includes the "unsolicited user interaction" - in this case, the automatic pop-up that will ask the user whether he/she wants to accept an otherwise untrusted certificate. QuickOPC still works, but the certificates must be trusted by the regular mechanism, i.e. placed in the appropriate stores.

2. The (default) location of the certificate stores differs from that under .NET Framework. See:

- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...html#Certificate%20Stores.html
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ry%20Certificate%20Stores.html

The main piece of information, taken from these articles, that you are probably missing is: "In .NET Standard, the default certificate stores paths are all in directories that are located under the current working directory of the application." - i.e. not under a "common" place on your computer.

Best regards

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

More
10 Oct 2022 13:58 #11141 by Ureña
QuickOPC 2020.2

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

More
10 Oct 2022 13:42 #11140 by support
Hello,

which QuickOPC version are you using please?

Best regards

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

More
10 Oct 2022 12:56 #11138 by Ureña
Hello, i have migrated a Winfomrs application from Net Framework to net Core 3.1 and i don't know how to accept the certificats, In a windows service i know a folder called opc foundation is created and i have to move the plc certificate from rejected certificates to the trusted folder, but in winforms when i run the application it didn't ask for the certificates then when I try to communicate with the plc I have the not trusted certificate error but the opc foundation folder doesn't appear.
How i have to manage the certificates in winforms?

Thanks

Edgar Ureña

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

Moderators: support
Time to create page: 0.053 seconds