The request was aborted: Could not create SSL/TLS secure channel.
Hi @Derek_Gervais, we use .net 4.5 and experience the same issue. I tried to apply all advises from this thread, but still this issue appears. It is NOT reproduced on local environment, what makes it hard to investigate and fix. I tried to apply all four SSL/TLS protocol version, still reproduced.
If we have an issue with TLS or root certificate - then, the issue would be reproduced all the time. So, it looks that on our end everything works ok, no issues locally.
Please, advise why it might happen and what should be done for deeper investigation and finally fix the issue.
Thanks for your answer. That's sad you did find anything. I will follow your advice and add extended logging. I hope we will be able to continue this discussion if I get more info. Thanks for your time.
So sorry for the delay here. Things got busy and this slipped under my radar. Unfortunately I don't have any major revelations for you. I dug into this with my team, and here's what we were able to find:
Because the connection is aborted before any information reaches our servers, it's not possible to collect logs on our end. We don't have any logs of these requests on our end, so we can't do any investigation on the HubSpot side.
One thing that we noticed was that if you were not ever retrying these requests, it might artificially inflate the error rates above the normal margin of error (since you wouldn't get a successful request after retrying). Might be a shot in the dark, but can you double check that you're retrying the requests shortly after seeing these errors?
Another possibility: SSL depends on both parties having synchronized clocks. Is it possible that there's a server on your end with an incorrect time? If your services are hosted on a cluster of servers, perhaps there's one with an incorrect time?
Outside of these possibilities, there isn't really anymore troubleshooting that I can easily do, since we've exhausted the information in HubSpot. If you can't find more information by troubleshooting the details of your implementation, I might consider adding more verbose logging and investigating with your hosting provider.
Thank you for your patience here. I'm currently digging into this with my team; I'll reach out here with any updates or if I need any additional information.
So just to be clear, you're specifying ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; and using .NET 4.5, or specifying ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11; and using .NET 4.0?
If that's the case, then I would also recommend checking that your root certificate authority is up to date. The HubSpot API has a valid SSL certificate, but it's possible that your server might not be able to trace our certificate to a trusted root CA: https://www.digicert.com/help/?host=api.hubapi.com
If all that checks out, I can try to dig into a specific request for more details. Our logs only go back for a week or so, so if you could give me a more recent example that would be very much appreciated!
Error is coming from my error logging, not from response.
Usually errors of this type mean that our server cannot validate SSL certificate of the your (hubspot server) where request is being submitted. But in this case it only happens sometimes so I think SSL certificate is not the reason.
And we are using latest or almost latest version of .net, and all those different protocol types from stackoverflow link you shared, are enabled.
Can you please specify which details of the request can be helpful for you?
I was hoping that you can check your error logging system using exact request time I have posted above to know the reason why it request was denied.
I'd be happy to help get to the bottom of this issue if you're struggling with the same problem. The underlying cause of the original issue that Andrew was experiencing was fixed, so if you're still seeing this type of error then it's likely for a different reason. Can you give me some more details on your setup and the errors your seeing?
Thanks for your patience here; can you give me some more details on the type of request you're making? Is the Could not create SSL/TLS secure channel error coming from the response, or from your error logging? The issue that andrew.wilinski and I were working on has been resolved, so even though the error is the same it's likely a separate issue.
The request was aborted: Could not create SSL/TLS secure channel.
Hello,
I am experiencing a similar issue: Part of requests to the Hubspot Contact API fails.
My web app is written on ASP.net Web API. I am getting same exception as above (The request was aborted: Could not create SSL/TLS secure channel.) and as in topic created by andrew.wilinski
The strange thing is errors started to occur on Dec, 20, 2017 and since then I am getting ~10 error reports every day. And there was no modifications to the code on my side. Dear Hubspot Technicians, can you help me with that? I mean, if you can take a look and see if those requests were aborted by some security reasons on your side or not?
The request was aborted: Could not create SSL/TLS secure channel.
This was fixed by someone from Hubspot. They sent me an email indicating there was a configuration error on one of their servers in the server pool. After they corrected the config error, I haven't had any errors. The issue was corrected on 2/26