Ftp Client LIST Exception

Giganews Newsgroups
Subject: Ftp Client LIST Exception
Posted by:  Alex (al…@naufragos.com.br)
Date: Sun, 14 Dec 2003

I don't know what I'm doing wrong. I have  a FORM, dropped an IdFtp1 and the
code looks like this:

procedure TForm1.BitBtn1Click(Sender: TObject);
var s1: TStringList;

begin
IdFtp1.Host      := edit1.text;
IdFtp1.Port      := strtoint(edit2.text);

IdFtp1.UserName      := edit3.text;
IdFtp1.Password      := edit4.text;

Memo1.lines.add('Conecting to ' +edit1.text+ '...');
IdFtp1.Connect(True);

showmessage(IDftp1.SystemDesc);
showmessage(idftp1.RetrieveCurrentDir);

Memo1.lines.add('Connected!');

strs := TStringList.Create;
IdFTP1.List(Strs);
^---- AT THIS PONT THE EXCEPTION POPS UP

No matter what I do, it allways throws the exception "Connection Closed
Gracefully". I've been for hours on this and I can't figure out what is
going on... I just started using Indy components, so I am not sure if I'm
even doing everything the way I should.

I tried against a IIS 5.0 server and a RedHat 8.0... the same thing
happends..
Any suggestions?

Thanks you!

Replies