Back

SecureChannelFailure while doing a https request?

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!

Update Backtest







Hi Michael. In the cloud, we are pinned at Mono 4.6.15 at the moment. This was the last version of Mono without memory leaks that has allowed the community's algorithms to run without issues for 6+ months. Unfortunately, this version of Mono has this HTTPS bug... 

You will need to serve it as HTTP unfortunately. If you cannot do this then I'll see about QuantConnect hosting an HTTPS->HTTP wrapper endpoint until the Mono version is upgraded.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Ok, I'll try to serve my data as HTTP.

Thanks for your answer.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed