Hi, Can the Rebex.NET.FTP able to connect to the FTP server using Active mode?
It works great when connecting to a ftp server which is running in passive mode. But it can't get directory listing using passive mode.
I have a microsoft windows 2008 server running Filezilla FTP server and using an public IP address but protected by MIcrosoft Firewall. It can only operate in Active mode.
my coding is as follows:
string FTPServer = getFTPServer(SiteCode);
string FTPUser = getFTPuser(SiteCode);
string FTPPass = getFTPpass(SiteCode);
Ftp client = new Ftp();
client.TransferMode = FtpTransferMode.Stream;
client.Connect(FTPServer);
client.Login(FTPUser, FTPPass);
string pathstr = Server.MapPath("/GlobalFiles");
pathstr = pathstr + "\\*";
client.PutFiles(@pathstr, "/", FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteOlder);
Many thanks,
Eddie