We have an eCommerce site that calls our own API (Web Api sat on a windows 2008 server + IIS) to move order from online to an on premise system.
The Api was working fine for months but now we are getting random errors which our logs are reporting as "The request was aborted: Could not create SSL/TLS secure channel."
The code will work ok for 24 hours or so and then fail, every call after will then fail. We then restart the eCommerce site (its hosted in Azure, so we restart the instance). Once the site has been restarted the calls to the Api start working again.
We are using Restsharp to call the Api.
We have looked into the certificates, etc and these seem fine (it also doesn't explain why sometimes it works ok).
At around the same time as it started failing we introduced a new plugin on the eCommerce site which uses the Amazon C# client to pull orders from Amazon into the eCommerce site.
The procedures run on a schedule task every hour or so.
Could this issue be around some sort of IIS caching? Maybe around amazon requiring a different version of TLS to our Api hosted on a win 2008 server?