Question The request was aborted. Could not create SSL/TLS secure channel when calling web API using HttpClient

Khwaja Khan

New member
Joined
Sep 24, 2024
Messages
1
Programming Experience
10+
Hi All,

I am getting the issue The request was aborted. Could not create SSL/TLS secure channel when accessing web API using HttpClient. I am using .Net Framework 4.5.2.

The following is my code.

1727184892522.png
 
Please post your code a text in code tags. (You can easily use code tags by using the button on the toolbar that looks like </>.)

Anyway, .NET Framework 4.5.2 went out of support back in April 26, 2022. You'll want to be using 4.8.1 as the best case scenario, or 4.6.2 at worse.

Also, setting the SecurityProtocol must be done before any network operations are done. Trying to change the protocols later won't have any effects.
 
Back
Top Bottom