0 votes
by (150 points)
edited

Our client has added a new FTP server with port of 1200. Rebex says "Invalid Port Number" when I try to connect using ":1200" after the IP of the FTP server. How can I connect using port 1200?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (58.9k points)
edited
 
Best answer

With Rebex FTP/SSL component you are able to connect to a custom port. Please try to run the following code to connect to port 1200 on your ftpServer:

try
{
    Ftp ftp = new Ftp();
    ftp.Connect("ftpServer", 1200);
    ftp.Login("username", "password");
}
catch(FtpException ex)
{
   Console.WriteLine(ex.ToString());
}

If the program above is not succesful, please send us the content of ex.ToString() from the catch block!

Thanks.

by (150 points)
edited

That worked! Thanks for your help!

...