Occasional 12030 exception at HTTP request

Aug 31, 2015 at 1:41 AM
I am faced with a problem where I am "occasionally" getting exception 12030 when attempting a HTTP request. To be more precise, the first request after a having no requests for a certain period of time (30~60 minutes) seems to return exception 12030. Consecutive request made within a short time after the first request all return valid responses.

MSDN defines exception 12030 as the following:
The connection with the server has been reset or terminated, or an incompatible SSL protocol was encountered. For example, WinHTTP version 5.1 does not support SSL2 unless the client specifically enables it.

I've tried changing the URL of the of the request from HTTPS to HTTP, and that seemed to fix the problem.
Unfortunately, we cannot use HTTP for our live service (HTTP requests will be redirected to HTTPS) so we need to fix this.

So here are my questions:
  1. What may cause this symptom? Is it really a SSL issue?
  2. I am using Casablanca 2.1. Has this issue been addressed in later versions?
  3. Are there any http_client options that can help?
Thanks in advance!
Sep 1, 2015 at 9:26 PM

I tried to repro the issue you are describing, however all my requests (spaced 30 - 60 min apart) get the correct response.
My http_client is sending HTTP GET requests to "https://www.bing.com/".

What server are you trying to send the request to? Is it authored using the C++ REST SDK http_listener?
It will be great if you could share a smaller repro, to help us investigate the issue.

Also, Casablanca 2.1 is more than a year old. We have since then made a lot of improvements to our http library.
We would recommend upgrading to the latest version and see if the problem gets resolved.