Handling HTTPS SSL certificate errors

When using self created SSL certificates with HTTPS WCF endpoints you might run into certificate validation errors. The best solution of to make sure all your certificates are fully trusted but sometimes that might not be an easy thing. The next best thing is to the the ServicePointManager.ServerCertificateValidationCallback and have add your own function to validate the certificate. This way you can ignore invalid certificates and keep going as if everything is well.

Take care though as this might open up a can of worms in a production environment.



4 thoughts on “Handling HTTPS SSL certificate errors

Leave a Reply

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