Link to home
Start Free TrialLog in
Avatar of hanselds
hanselds

asked on

FTP Passive Commands VB

I am using a VB application that I have made to upload files using FTP. But I cannot get passive commands to work on it. Could you tell me how I could use the passive mode for FTP upload and what the commands would be?
Avatar of liads
liads
Flag of Israel image

Are you using an FTP component or are you implementing the connection yourself using winsock?
The PASV command has to be sent to the server. Then, the server gives you an IP and a port number (the port number needs translation), and the client needs to open another TCP connection to this IP and port to establish the data connection.
Avatar of hanselds
hanselds

ASKER

It is my own application made using the winsock control. I want to know how to initialise the passive mode and how to send the command
I once this component which is open source
http://www.enterprisedt.com/products/edtftpnet/overview.html

please be aware that you can either
- use the component,
- use source from it and release your library gpl,
- buy a non-gpl source license

I'd suggest you just use their component as it is, it works fine
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Once you have established your new data connection to the specifed IP and Port, send a RETR command on the control connection and the file will start streaming across your new data connection.

~IM
Idle_Mind deserves'em imo