I'm getting the message error given in the subject when trying to connect to an FTP server.
Below the code i'm using; the error is raised from the DownloadFile method (not from the Connect() method).
Note that if i try to connect to the same server with FILEZILLA from the same workstation i have no problem (after setting the active mode in FILEZILLA connection settings).
m_FtpConnection.ServerAddress = customerConfig.FtpServer;
m_FtpConnection.ServerPort = int.Parse(customerConfig.FtpPort);
m_FtpConnection.UserName = customerConfig.FtpUser;
m_FtpConnection.Password = customerConfig.FtpPwd;
m_FtpConnection.Timeout = 120000;
if (customerConfig.FtpMode == "active")
{
m_FtpConnection.ConnectMode = FTPConnectMode.ACTIVE;
}
else if (customerConfig.FtpMode == "pasv")
m_FtpConnection.ConnectMode = FTPConnectMode.PASV;
m_FtpConnection.TransferType = FTPTransferType.BINARY;
m_FtpConnection.Connect();
m_FtpConnection.DownloadFile("down.txt","index.txt");