To download using HTTPS, the machine needs to have the HTTPS certificate in its trusted store. If it is not (e.g. it is a self signed certificate), you will get an error like "Could not establish trust relationship for the SSL/TLS secure channel".
Currently, to deal with this the certificate needs to be imported into the trusted store, or validation needs to be bypassed.
This can be done as follows, using the ServerCertificateValidationCallback.
+= new RemoteCertificateValidationCallback(BypassSslCertificateValidation);
ftpConnection.Protocol = FileTransferProtocol.HTTP;
ftpConnection.UserName = "javaftp";
ftpConnection.Password = "javaftp";
ftpConnection.ServerAddress = "https://myurl";
private static bool BypassSslCertificateValidation(
object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)