We are programming against a proprietary ftp server. One of the commands we need to run is "LS". Typing "LS" in an ftp session results in something different than industry standard. When using Rebex, it results in "502 Bad command or it is not implemented here." I think this is because before issuing my command, Rebex, by itself, sends "FEAT" (Observe log file contents below). Is there any way for me to be in complete control of the commands issued during an ftp session, for example not sending the "FEAT" command?
:: Our 'LS' command returns this:
ftp> LS
200 Port command successful.
150 Opening ASCII mode data connection for transfer
Mailbox ID St APRF SNRF Service Ref. #
CMS N EDI_856I file6jjwgl0015 003577536380496058
CMS N EDI_862O fileZgXSif0016 003577536380763539
226 Transfer Complete.
ftp: 219 bytes received in 0.05Seconds 4.76Kbytes/sec.
ftp>
:: Rebex Log file:
2013-05-14 15:45:00.172 Opening log file.
2013-05-14 15:45:00.203 INFO Ftp(1)[1] Info: Connecting to edi.cat.com:21 using Ftp 4.0.4700.0 (trial version).
2013-05-14 15:45:00.203 INFO Ftp(1)[1] Info: Using proxy none.
2013-05-14 15:45:00.640 DEBUG Ftp(1)[1] Info: Connection succeeded.
2013-05-14 15:45:00.640 INFO Ftp(1)[1] Response: 220 Enterprise FTP server (Version 1.0.0 Nov. 5, 1996)
2013-05-14 15:45:00.656 INFO Ftp(1)[1] Command: USER ESS08F87
2013-05-14 15:45:00.687 INFO Ftp(1)[1] Response: 331 Password required for ESS08F87
2013-05-14 15:45:00.687 INFO Ftp(1)[1] Command: PASS ********
2013-05-14 15:45:00.750 INFO Ftp(1)[1] Response: 230-User logged in, proceed.
2013-05-14 15:45:00.750 INFO Ftp(1)[1] Response: Current Default Relationship - Recv: ESS08F87 APRF: *BINARY
2013-05-14 15:45:00.750 INFO Ftp(1)[1] Response: Get option: multiple
2013-05-14 15:45:00.750 INFO Ftp(1)[1] Response: 230
2013-05-14 15:45:00.750 INFO Ftp(1)[1] Command: FEAT
2013-05-14 15:45:00.796 INFO Ftp(1)[1] Response: 502 Bad command or it is not implemented here.
2013-05-14 15:45:00.796 INFO Ftp(1)[1] Command: LS
2013-05-14 15:45:00.843 INFO Ftp(1)[1] Response: 502 Bad command or it is not implemented here.
2013-05-14 15:45:00.843 INFO Ftp(1)[1] Command: QUIT
2013-05-14 15:45:00.874 INFO Ftp(1)[1] Response: 221 Thanks for using Enterprise.
:: Here is my C# code:
Stream output;
using (Ftp ftp = new Ftp()) {
ftp.LogWriter = new Rebex.FileLogWriter(@".\_archive\logs\REBEXLog.txt", Rebex.LogLevel.Debug);
ftp.Connect(Global.DownloadFtpAddress);
ftp.Login(Global.DownloadUserName, Global.DownloadPassword);
ftp.SendCommand("ls");
var resp = ftp.ReadResponse();
output = new MemoryStream(Encoding.ASCII.GetBytes(resp.Raw));
ftp.Disconnect();
}
PLEASE HELP!
thanks,
Tim Morris
timorris@timorris.com