Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in .NET FTP by (120 points)
We are experiencing some issues for large file uploads. The problem is we are only seeing this issue for a few of our clients. Most clients are working just fine. For example, the below exception was thrown after a 200Mb file was uploaded to our server:

System.IO.IOException: Unable to read data from the transport connection.
---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransfer()
at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
at AscendLDR.Form1.uploadDatabase()

I did not write the initial implementation of the edtftp client in our C# application, but here is how we are using the client in our application:

string ftpServer = System.Configuration.ConfigurationSettings.AppSettings["FTPServer"];
string ftpDirectory =
System.Configuration.ConfigurationSettings.AppSettings["FTPDirectory"];
string ftpUser = System.Configuration.ConfigurationSettings.AppSettings["FTPUser"];
string ftpPassword = System.Configuration.ConfigurationSettings.AppSettings["FTPPassword"];
string remoteFile =
System.Configuration.ConfigurationSettings.AppSettings["LocationGUID"] + ".zip";

// put zip file to remote server
FTPClient ftp = null;

try
{
ftp = new FTPClient(ftpServer);
ftp.Login(ftpUser, ftpPassword);
// ftp.Timeout = 1000 * 60 * 5;
ftp.ConnectMode = FTPConnectMode.PASV;
ftp.TransferType = FTPTransferType.BINARY;
ftp.Put(zipFile, @"" + ftpDirectory + remoteFile, false);
ftp.Quit();

Finally, we are using version 1.1.8 of the free version. Any help or suggestions would be greatly appreciated.

Kind regards,
-JSLucido

1 Answer

0 votes
by (162k points)
Could you post the part of the log file at the end of the transfer?

It could be that the server is timing out.

Categories

...