HttpClient SSL A connection with the server could not be established

Sep 29, 2015 at 8:27 PM
Edited Sep 29, 2015 at 8:27 PM

I'm using httpclient to talk to an API through SSL. I'm using http_client_config to add a client certificate through the native handle lambda.

When I make a request, I get an exception
"WinHttpSendRequest: 12029: A connection with the server could not be established\r\n"
Any clue of what is going on? How can I get more information?

The server has a trusted certificate.

Thanks in advance for your help!
Sep 29, 2015 at 11:45 PM
Actually, I tried a more basic example and I'm getting the same error:
        http_client client(U(""));
        uri_builder builder(U("/search"));
        builder.append_query(U("q"), U("Casablanca CodePlex"));

        auto task = client.request(methods::GET, builder.to_string()).then([](http_response response)

May this be due to preprocessor directives? These are my current ones:
Any help of why I get this error in such a simple example will be greatly appreciated. Thanks!
Sep 30, 2015 at 9:04 PM
Update, even in a brand new project with the code above and without any preprocessor directives I get the same error. What is going on here? How can I get more info about the exception? Do you have any ideas of what could be happening? Thanks!
Sep 30, 2015 at 9:30 PM
Edited Sep 30, 2015 at 9:53 PM
Oct 6, 2015 at 6:16 AM
hey carlosscastro

That seems weird. Sending a HTTP::GET request is a very basic scenario, that we test thoroughly. The above sample code works in my setup.
Are you able to use any other client to send the request?
One way to go about troubleshooting this is to use a debugging proxy tool like Fiddler.
Have you checked your firewall settings?

Apr 26, 2017 at 2:48 PM
probably you need admin rights in order to connect the client