Not able to create SSL/TLS secure channel

Hi, I am using .net 4.6 to create an user in the Okta application using the Okta API. I have the request object created properly with apiToken and Oktaurl. However when I try to create the Stream object using request.GetRequestStream(), I get an error ‘The request was aborted: Could not create SSL/TLS secure channel.’ I checked Internet Options, both TLS1.1 and TLS1.2 are checked. I add the below like to see if it helps, but did not help
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
Has anyone has a solution that I can use? Happy to share any details.

I was able to overcome the issue by adding the below line at in startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.