edtFTPnet/Free - Open-source FTP component for .NET | Download
 How to connect to an FTP server

Connecting to an FTP server with edtFTPnet/Compact is simply a matter of:

1.    Creating an FTPConnection object

FTPConnection ftp = new FTPConnection();

2.    Setting the remote host and user credentials

ftpConnection.ServerAddress = "myserver";
ftpConnection.UserName = userName;
ftpConnection.Password = password;


3.    Calling the Connect() method, which connects to the server and logs in. An exception is thrown if it fails to connect and log in.

ftpConnection.Connect();

4.    Logging out and closing the connection.

ftp.Close();