Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Port Command usinf NMFTP

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
0
0
GB
Help!!!

Have developed a program which FTP's to website and back for a client. It works fine on my laptop but when I run it on client machine it connects to website ok but soon as it tries to upload / download it comes up with "500 Invalid PORT command" .. i can upload / download manually through explorer ok.

Any ideas anyone ?

Using C++ Builder Professional 5

Regards

BuilderSpec
 
Are your client machine and laptop connected to the same network? My first thought was maybe not. If your laptop is on one network but you client machine on other, maybe the port is being blocked.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
On one machine I run a program that :

Connects via FTP to a web server and logs in with user and password ( this works fine )
Tries to download a file ( this is when I get the Invalid Port Command )

I use NMFTP component for this is as follows:

NMFTP1->Host = "NMFTP1->User = "sfkjvfkj"
NMFTP1->Password = "skh"
NMFTP1->Connect();

// the above statements work

NMFTP1->Download ( "filename.txt");
// the above statement generates the 500 Invalid port command error

(Assume filename.txt exists)

If I do the same operation via Windows Explorer I can connect and download the file ok ( this is on the same machine )

Regards

BuilderSpec
 
I don't know much about NMFTP so I may not be much help. What port does it use for file tranfers?


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Does Windows use port 20? I don't know for sure.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top