Disable validation of Self-Signed Certificates

You can use the following code:

ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;

Be aware that this code does just accept every certificate and it is not only active for one request but for all requests. You should think before you use this code. But for development convenience or on a test system it might be ok to make your program easier to install and test.

Leave a comment

Your email address will not be published. Required fields are marked *