Click here to Skip to main content
15,881,600 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;
OR
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
OR
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
OR
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
OR
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl;

ServicePointManager.ServerCertificateValidationCallback = (snder, cert, chain, error) => true;
Posted
Updated 23-Jul-21 23:27pm
v3
Comments
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    
ok

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