3

I would like to have Flurl and the underlying HttpClient library ignore SSL errors so I can dev locally.

Specifically, I have a web api that requires a SSL certificate. I create a temporary one so I can dev locally, however Flurl and HttpClient return an error on the SSL check.

How can I disable the SSL error check?

Brett Cook
  • 31
  • 2
  • You can't "disable" a server-side check from the client. Are you just trying to get SSL to work in your dev environment? This has been asked and answered many times, see [here](http://stackoverflow.com/questions/12506575/how-to-ignore-the-certificate-check-when-ssl) and [here](http://stackoverflow.com/questions/22251689/make-https-call-using-httpclient). If that's not what you're looking for then I think some more details are needed. Please post the relevant code and exception details. – Todd Menier Dec 02 '15 at 14:40
  • 1
    @Todd Menier Yes, I'm just trying to get SSL working in my dev environment. Essentially, I want to do this: `ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };` And I'm wondering if there's an easy way to do that with flurl? – Brett Cook Dec 02 '15 at 18:50
  • 1
    Flurl doesn't provide any sort of shortcut for that, but adding that line should have the exact same effect on a Flurl call as it does on an HttpClient call. – Todd Menier Dec 02 '15 at 19:35
  • Ok, so it turns out this was working all along. The problem was, I had a HockeyApp component in my project that was overwriting these settings. Disabling HockeyApp did the trick! – Brett Cook Dec 02 '15 at 23:55
  • 1
    Never trust a hockey player. Glad you got it figured out. – Todd Menier Dec 03 '15 at 00:00

0 Answers0