Hi,
i downloaded a trail version 3.1.0.0.
and i implemented one test application.with Upload and Download functionalities.
Upload functionality is working fine but while downloading i am getting error like
--------------------------------------------------------------------------------
10:35:16.734 Info Info: Connecting to ******** using Ftp 4.0.4444.0 (trial version).
10:35:16.734 Info Info: Using proxy none.
10:35:17.406 Info Response: 220 Welcome to ******** Secure FTP Server.
10:35:17.421 Info Command: USER ********
10:35:17.718 Info Response: 331 User name okay, need password.
10:35:17.734 Info Command: PASS ********
10:35:18.031 Info Response: 230 User logged in, proceed.
10:35:18.046 Info Command: FEAT
10:35:18.343 Info Response: 211-Extension supported
10:35:18.828 Info Response: AUTH TLS
10:35:18.828 Info Response: SSCN
10:35:18.828 Info Response: PBSZ
10:35:18.828 Info Response: PROT
10:35:18.828 Info Response: CCC
10:35:18.828 Info Response: CLNT
10:35:18.843 Info Response: MDTM
10:35:18.843 Info Response: MDTM YYYYMMDDHHMMSS[+-TZ];filename
10:35:18.843 Info Response: SIZE
10:35:18.843 Info Response: SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG
10:35:18.843 Info Response: REST STREAM
10:35:18.843 Info Response: XCRC filename;start;end
10:35:18.843 Info Response: MODE Z
10:35:18.843 Info Response: MLST Type*;Size*;Create;Modify*;Win32.ea*;
10:35:18.843 Info Response: 211 End
10:35:18.859 Info Command: SYST
10:35:19.156 Info Response: 215 UNIX Type: L8
10:35:19.156 Info Command: PWD
10:35:19.468 Info Response: 257 "/g:/test" is current directory.
10:35:19.468 Info Command: MLST INBOX
10:35:19.781 Info Response: 250-Listing /g:/test
10:35:20.250 Info Response: Type=dir;Modify=20120402041751;Win32.ea=0x00000010; INBOX
10:35:20.250 Info Response: 250 End.
10:35:20.250 Info Command: CWD /g:/test/INBOX
10:35:20.562 Info Response: 250 Directory changed to /g:/test/INBOX
10:35:20.562 Info Command: PWD
10:35:20.859 Info Response: 257 "/g:/test/INBOX" is current directory.
10:35:20.906 Info Command: MLST /g:/test/INBOX
10:35:21.218 Info Response: 250-Listing /g:/test
10:35:21.671 Info Response: Type=dir;Modify=20120402041751;Win32.ea=0x00000010; INBOX
10:35:21.671 Info Response: 250 End.
10:35:21.718 Info Command: TYPE A
10:35:22.015 Info Response: 200 Type set to A.
10:35:22.031 Info Command: PASV
10:35:22.328 Info Response: 227 Entering Passive Mode (209,240,160,82,4,117)
10:35:22.671 Info Command: MLSD /g:/test/INBOX
10:35:22.968 Info Response: 150 Opening BINARY mode data connection for MLSD.
10:35:23.421 Info Response: 226 Transfer complete.
10:35:23.421 Info Command: PASV
10:35:23.734 Info Response: 227 Entering Passive Mode (209,240,160,82,4,118)
10:35:24.046 Info Command: MLSD /g:/test/INBOX/INBOX
10:35:24.343 Info Response: 501 /g:/test/INBOX/INBOX: Not a directory.
10:35:24.421 Error Info: Rebex.Net.FtpBatchTransferException: Error when retrieving items from a remote directory ('/g:/test/INBOX/INBOX'). /g:/test/INBOX/INBOX: Not a directory (501). ---> Rebex.Net.FtpException: /g:/test/INBOX/INBOX: Not a directory (501).
at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
at Rebex.Net.Ftp.zo0DuZ(String , Boolean , Stream , Int64 , String , 27NpLhZ )
at Rebex.Net.Ftp.1rcNck(String , 27NpLhZ )
at gbMKS.2DV1RXZ.ProcessRemoteDirectory(1YiDCIZ traversalInfo, Boolean addNewInfos)
--- End of inner exception stack trace ---
at 1RyBHn.1yALZOZ.HandleException(Exception ex, 2CkSFs type, 1Acxa2 remoteItem, 1Acxa2 localItem, 1vhEpGZ defaultAction, 1vhEpGZ possibleActions, 1vhEpGZ& chosenAction)
at 1RyBHn.1yALZOZ.HandleCaughtException(Exception caught, String message, 2CkSFs type, String remotePath, String localPath, 1Acxa2 remoteItem, 1Acxa2 localItem, 1vhEpGZ possibleActions, 1vhEpGZ& chosenAction)
at 1RyBHn.1yALZOZ.cIZv0(1YiDCIZ )
at 1RyBHn.1yALZOZ.N30HDZ()
at 1RyBHn.1yALZOZ.Transfer(YpcDbZ method, 18waHwZ sourceFilter, String targetPath, TransferMethod transferMethod, MoveMode moveMode, LinkProcessingMode actionOnLinks, ActionOnExistingFiles actionOnExistingFiles, 1Acxa2 expectedRootItem)
at gbMKS.2DV1RXZ.1jMzU7Z(28xx7VZ , p5IYsZ , String , TransferMethod , MoveMode , LinkProcessingMode , ActionOnExistingFiles )
at Rebex.Net.Ftp.VGSfy(p5IYsZ , String , TransferMethod , MoveMode , LinkProcessingMode , ActionOnExistingFiles )
--------------------------------------------------------------------------------
and my code for Download is:
ftp.Connect(strFtpIp, iFtpPort);
ftp.Login(strFtpUsrname, strFtpPwd);
string strFtpCurrentDir = string.Empty;
bool blFtpDirExists;
strFtpCurrentDir = ftp.GetCurrentDirectory();
blFtpDirExists = ftp.DirectoryExists(strFtpDownloadDir);
if (blFtpDirExists == true)
{
ftp.ChangeDirectory(strFtpCurrentDir + "/" + strFtpDownloadDir);
strFtpCurrentDir = ftp.GetCurrentDirectory();
DirectoryInfo localDir = new DirectoryInfo(strLocalDir);
if (!localDir.Exists)
{
localDir.Create();
}
ftp.GetFiles(strFtpCurrentDir, localDir.ToString(), FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteAll);
ftp.Disconnect();
What mistake in my code.
help me to resolve this issue
Thanks in adnace
Srinu