Exception thrown, certificate is not trusted

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
AdeSav
Jr. Member
Jr. Member
Posts: 1
Joined: 31 Aug 2017, 14:30

Exception thrown, certificate is not trusted

Post by AdeSav »

Using the UA sample "Client Full", I am getting an exception (UnifiedAutomation.UaBase.StatusException) saying "Certificate is not trusted".
The exception is thrown and caught in the program's MainForm, and I do not see the TrustCertificateDialog as expected.
I have exported the certificate and added it to the Trusted Root Certification Authorities store.
The exception message includes the thumbprint, which I used to check that the certificate is in the store.
(By the way, the program I'm connecting to, and from which the certificate was exported, happens to be Industrial Gateway OPC Server)

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Exception thrown, certificate is not trusted

Post by Support Team »

Hello,

The FullClient example does not pop up a dialog if a certificate is not trusted, that means the UntrustedCertificate EventHandler is not implemented here. You have to move the Certificate from the Rejected folder to the Trusted folder. Of cource you can impleemnt the EventHandler yourself.

Are you able to connect after you have moved the certificate?
Best regards
Unified Automation Support Team

Post Reply