Hi,
I'm trying to do a https-request agains my server like this:But i received this Exception:
var result = new WebClient().DownloadString("https://myserver.com/securedata");
Runtime Error: Error: SecureChannelFailure (The authentication or decryption has failed.) The authentication or decryption has failed. Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed. at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x00040] in <e220be0b0a364427860ee43376ab6f2b>:0 at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <e220be0b0a364427860ee43376ab6f2b>:0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <e220be0b0a364427860ee43376ab6f2b>:0
I added this ServerCertificateValidationCallback - but it fails with the same error!
System.Net.ServicePointManager.ServerCertificateValidationCallback += (o, certificate, chain, errors) => true;
Can you help me and tell me how to do a https request?
Thanks!