Hi
When I try to make the GET of a Large File (60 MB) I receive an error "File not Found", also itself the file exists.
Why ??
----------------------CODE --------------------------------------------------
string myLogFileName = "c:\\my_log.txt";
Logger log = Logger.GetLogger(typeof(frmTraferimentoFlussi));
//Logger.CurrentLevel = Level.ALL;
Logger.AddAppender(new FileAppender(myLogFileName));
// assign args to make it clear
string host = "10.9.**.**";
string user = "pippo";
string password = "******";
FTPClient ftp = null;
try
{
// set up client
log.Info("Connecting");
ftp = new FTPClient(host);
ftp.Timeout = 1000000;
// login
log.Info("Logging in");
ftp.Login(user, password);
// set up passive ASCII transfers
log.Debug("Setting up passive, ASCII transfers");
ftp.ConnectMode = FTPConnectMode.PASV;
ftp.TransferType = FTPTransferType.BINARY;
ftp.ChDir("transfer");
string [] files = ftp.Dir();
for (int i = 0 ; i < files.Length; i++)
{
MessageBox.Show(files[i].ToString());
log.Info(files[i].ToString());
}
ftp.ChDir("other");
files = ftp.Dir();
for (int i = 0 ; i < files.Length; i++)
{
MessageBox.Show(files[i].ToString());
log.Info(files[i].ToString());
}
ftp.ChDir("pluto");
files = ftp.Dir();
for (int i = 0 ; i < files.Length; i++)
{
MessageBox.Show(files[i].ToString());
log.Info(files[i].ToString());
}
//this is ok --- is only 10k
ftp.Get("c:\\pippo.tar","filename001.PTilog001.tar");
// File non Found ---- also itself the file exist
ftp.Get("c:\\pippo2.tar","filename002.PTimm001.tar");
// Shut down client
log.Info("Quitting client");
ftp.Quit();
log.Info("Test complete");
Logger.Shutdown();
}
catch (Exception ex)
{
log.Debug(ex.Message, ex);
Logger.Shutdown();
}
-----------------------------------------END CODE -----------------------------
---------------------This is file Log on error:----------------------------------
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 13 apr 2005 18.45.18.787 : 200 Data port accepted
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 13 apr 2005 18.45.18.787 : ---> RETR filename002.PTimm001.tar
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 13 apr 2005 18.45.19.037 : 550 File not found
DEBUG [Trasferimento_Flussi.frmTraferimentoFlussi] 13 apr 2005 18.45.20.760 : File not found : File not found
at EnterpriseDT.Net.Ftp.FTPClient.InitGet(String remoteFile)
at EnterpriseDT.Net.Ftp.FTPClient.GetBinary(String localPath, String remoteFile)
at EnterpriseDT.Net.Ftp.FTPClient.Get(String localPath, String remoteFile)
at Trasferimento_Flussi.frmTraferimentoFlussi.ftp_Click(Object sender, EventArgs e) in f:\dev\project\....
-----------------------------------------END Log -----------------------------