Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.2k views
in .NET FTP by
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 -----------------------------

4 Answers

0 votes
by (161k points)
Since you are getting "550 File not found" back from the FTP server, it seems that the server can't find the file.

Try getting it using ftp.exe & see if you get the same error.

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.
0 votes
by
I just try with ftp.exe in dos and also another client ftp program, return the same error: "File not found" also itself the file exists.
0 votes
by (161k points)
So either the file of the supplied name is not there, or the FTP server is not finding it ...

I just try with ftp.exe in dos and also another client ftp program, return the same error: "File not found" also itself the file exists.
0 votes
by (51.2k points)
I just try with ftp.exe in dos and also another client ftp program, return the same error: "File not found" also itself the file exists.


Then it's definitely a problem on the server. It might be a permission problem. In other words, the account that runs the FTP server, or perhaps the user logged into the FTP server, may not have sufficient permissions.

- Hans (EDT)

Categories

...