Getting xml document from url with ECDSA certificate

81 views Asked by At

I need the XML from an Url that has an ECDSA certifcate. When I try to get this, I get the error:

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

I tried:

ServicePointManager.ServerCertificateValidationCallback = (snder, cert, chain, error) => true;

and

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

and

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

but still the same error.

1

There are 1 answers

0
Sander van de Pas On BEST ANSWER

Finally fixed it by adding this row:

//Set the security protocol to SL12 otherwise it returns an error ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | (SecurityProtocolType)3072;