Invalid Port

0 votes
asked Aug 28, 2013 by hbennett (150 points)
edited Aug 28, 2013

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
answered Aug 28, 2013 by Tomas Knopp (58,890 points)
edited Aug 28, 2013
 
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.

commented Aug 28, 2013 by hbennett (150 points)
edited Aug 28, 2013

That worked! Thanks for your help!

...