|Subject:||IdFtp & IdFtpServer - downloading file in passive mode fails|
|Posted by:||Tomasz B (t.berg.REMO…@slican.pl)|
|Date:||Tue, 09 Sep 2008|
I've run out of all ideas. It just doesn't work.
I've created two separated application 'ftp client' (idFTP) and 'ftp
server' (idFTPServer). They generally work (generally).
Client can connect 'non indy' server (ie. filezilla ftp server) in both
passive and active transfer mode. Server also cope with 'non indy' ftp
clients (ie total commander) connecting with it using both modes.
Both server and client can work together using active transfer mode...
But there is one little problem - they can't cooperate with each other
if client want to download file using passive mode.
During debuging server application I found out that idFtpServer received
port param of OnServerPASVReply event and sent it into a client idFTP
(I'm able to read it in idFTP OnDataChannelCreate event) but IdFtp get()
method threw an EIdSockerError 10061 when try to connect.
Error description from msdn:
• Translation: Connection refused.
• Description: No connection can be made because the destination
computer actively refuses it. This error typically results from trying
to connect to a service that is inactive on the foreign host, that is,
one that does not have a server program running.
bla bla bla ...
so I disabled system firewall completely - and... nothing has changed.
I've make small experiment - I scanned opened port in system with FTP
server in the same moment just after idFTP in client application had
fired OnDataChannelCreate event.
Result are a little bit astonishing (for me).
The only different is the fact that FileZilla Server open listening port
before idFtp generate OnDataChannelCreate and idFTP server doesn't do it.
Output from netstat (for filezilla):
TCP 0.0.0.0:49213 xxxx:0
NASt(UCHIWANIE(LISTENING) [FileZilla Server.exe]
So if anybody has any advice for me or know how to run passive
connection between indy FTP/FTPServer or has working example (maybe I
forgot to set some parameter?)...
I use Indy 10 (revision 3525) in BCB 6