Open giviglie opened 6 years ago
Indeed, the usage is not detailed here. You can refer to https://docs.microsoft.com/en-us/dotnet/api/system.net.security.remotecertificatevalidationcallback?redirectedfrom=MSDN&view=netframework-4.7.2
However, I'm trying to access a synology NAS through WebDAV and like @giviglie , the callback seems to never be called. I just added a "return true;" in the callback but the client continues to say that the certificate can't be validated.
Did you make sure to register your callback:
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateCertificate);
Which version of .Net are you using? .Net Framework 4.x? .Net Core 2.x? .Net Core 3.x
Not clear how to use it. Always getting a TLS error message and callbeck is never called.
Thanks