Click here to Skip to main content
15,790,723 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Please any one help me on below error:-

The request was aborted: Could not create SSL/TLS secure channel.

Same was working fine using postman with tls and tls1.3 version. but when i try it through ASP.NET 4.8 application. it does not work and gives above error.

In this application, i am using .p12 certificate for using third party api which work on tls & tls1.3 version.

Please guide

when we use tls1.3 than it gives below error:-

The client and server cannot communicate, because they do not possess a common algorithm

What I have tried:

ServicePointManager.Expect100Continue = false;
ServicePointManager.DefaultConnectionLimit = 9999;

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl;

ServicePointManager.ServerCertificateValidationCallback = (snder, cert, chain, error) => true;
Updated 24-Jul-21 0:27am
SeeSharp2 27-Jul-21 13:43pm    
If it works in Postman then figure out what you are not doing in .Net that Postman is.
Gaurav Otpl 5-Aug-21 1:50am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900