I have added following line of code to Application_Start()
, hoping that it could resolve the error Could not create SSL/TLS secure channel
. But this still doesn't fix my issue.
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
// stacktrace
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
Oddly, there isn't any problem if I initiate my requests over Https with Postman. I get 200 and API call works fine there.
Am I still missing something here? Or is there anything else I can perhaps try?