WebClient The request was aborted: Could not create SSL/TLS secure channel
- by Tomas
I am using WebClient in ASP.NET app to call PayPal secured url to create payment button. While calling secured PayPal Url I get error below. How to solve this problem? Do I need to purchase certificate to just call secured url?
The request was aborted: Could not create SSL/TLS secure channel.
My code
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
using (var client = new WebClient())
{
var postBytes = Encoding.ASCII.GetBytes(param);
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
responseBytes = client.UploadData(_paymentProcessorCredentials.PayPalApiUrl, "POST", postBytes);
}