Using Certificate in winscp.dll getting error SessionOptions.FtpSecure is not enabled
The real error is:
As I change to other options, log shows the change of my options but nothing changes as far as the error is concerned. Cannot connect. I can use the app with the same certificate and other credentials and all is well.
My Log
My current code:
I must be doing something wrong, just do not know what it is.
Thanks for your help.
I am setting it as you can see here in my log it shows Implicit:SessionOptions.TlsClientCertificatePath is set, but neither SessionOptions.FtpSecure nor SessionOptions.Secure is enabled.
As I change to other options, log shows the change of my options but nothing changes as far as the error is concerned. Cannot connect. I can use the app with the same certificate and other credentials and all is well.
My Log
Connecting - Certificate \\ebill-server-22\fileserver\shareng\911\9112021\id_ed25519-cert.pub Ftpsecure:Implicit Secure: False giveup: False Connecting - Opening Connection WINSCP Connecting - Error: SessionOptions.TlsClientCertificatePath is set, but neither SessionOptions.FtpSecure nor SessionOptions.Secure is enabled. Connecting - Error: SessionOptions.TlsClientCertificatePath is set, but neither SessionOptions.FtpSecure nor SessionOptions.Secure is enabled. Connecting - Error: SessionOptions.TlsClientCertificatePath is set, but neither SessionOptions.FtpSecure nor SessionOptions.Secure is enabled.
.FtpSecure = FtpSecure.Implicit ' .GiveUpSecurityAndAcceptAnyTlsHostCertificate = True .TlsClientCertificatePath = sublib2025.gblCertificate '.SshHostKeyPolicy = SshHostKeyPolicy.GiveUpSecurityAndAcceptAny write2TxtLogFile("Connecting", "Certificate " + .TlsClientCertificatePath.ToString + " Ftpsecure:" + .FtpSecure.ToString + " Secure: " + .Secure.ToString + " giveup: " + .GiveUpSecurityAndAcceptAnyTlsHostCertificate.ToString)
Thanks for your help.