2 years ago, I wrote a simple client/server program for someone using Delphi 7 and Indy to send and receive some data through the Internet.
I used TIdFTP
to connect to their server and get and put data on it.
It worked well for 2 years. Today, they have opened another office in another city, and they want to copy the program to their new office computer, but the program doesn't work there.
The program connects successfully, but can't read the directory list, or put or get data. If it tries to send a file to the server, they just end up with an empty file!
First, I thought the problem is with the firewall, or something like that, but the program doesn't work on Win XP, 7, or 8 with and without a firewall (I disabled firewalls on all the antivirus, and even the Windows firewall). I know there is no problem with a firewall.
There are only two things different between their computer (that doesn't work) and the other computer (that does work):
- ISP
- router
They have 4 computers and a cable router.
Now I want to ask you:
can the ISP block traffic like this? Connect successful, but not anything else (put, get, list)?
is there anything about the router and
TIdFTP
?
What can I do?
my code is very simple like this:
idftp1.Port:=21;
idftp1.Host:='ftp.***.ir';
idftp1.Username:='ftp@***.ir';
idftp1.Password:='***';
idftp1.Connect;
fp:='c:\download';
idftp1.ChangeDir('***');
idftp1.Put(fp+'\message.rhp','message.rhp',false);