1

I'm trying to access a RESTful webservice which contains a self signed certificate (which I have) I'm not quite sure if i can do this by adding this to the webclient ? Or should I be accepting the certificate in the validationcallback? In the callback situation , how can i compare my local certificate to the one received ?

ron.
  • 11
  • 1
  • 1
    You can do either, depending on your needs. This [SO answer](http://stackoverflow.com/questions/2066489/how-can-you-add-a-certificate-to-webclient-c) has implementation details for different scenarios. – CrnaStena Feb 05 '16 at 15:37
  • @CrnaStena Thanks for your helpful comment. I searched for a way to ignore the certificate and to always return true in the validation, and it is found in the SO answer you linked. If someone is also interested, the answer is hidden inside "yop038" comment: Just add this line of code (before the WebClient Request): ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; – Avraham Shalev Aug 21 '19 at 17:23

0 Answers0