tscftpclient ftps delphi example

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
fvancrae
Posts: 1
Joined: Mon 20 Apr 2020 15:06

tscftpclient ftps delphi example

Post by fvancrae » Mon 20 Apr 2020 15:56

Is there an example on how to write an FTPS client?

The documentation points to tscftpclient and I have an overview of the methods and properties but the correct call sequence is unclear.

Specifically : What should be called first: Connect or Login?

When I call Connect first it says 'FTP server error occured: not logged in'
When I call Login first an exception is thrown 'FTP client not connected'


FFTPSClient.HostName:=host;
FFTPSClient.port := port;
FFTPSClient.TLSMode:=tmAllowExplicitTLS;
FFTPSClient.Username := user;
FFTPSClient.AuthCommand := acAuto;
FFTPSClient.Password := pwd;
FFTPSClient.UsePassive:=(not (ftpoptNotPassive in ftpoptions));

FFTPSClient.Connect();
FFTPSClient.Login();

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: tscftpclient ftps delphi example

Post by ViktorV » Tue 21 Apr 2020 11:07

The method TScFTPClient.Connect should be invoked before the method TScFTPClient.Login.
Please grant us access to your FTP server for testing purposes so that we could give you a detailed answer.

Post Reply