Dear experts,
I have a strange situation. We installed a FTP Server with several accounts on it. Every client is using exact the same version of the Aspose.Network component and tries to download messages after a specific amount of time (check if there are new messages, zip-Files) with exact the same code.
So far so good, everything is working like it should except for one client. He has problems to transfer some files. But the annoying thing is, that the error does not happen constantly. All is working fine till a "special" message arrives and the library is throwing the following error:
---> System.IO.IOException: Unable to read data from the transport connection: 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. ---> 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 Aspose.Network.Ftp.FtpClient.x5dfa1f60a4c6405f.xc5abe82d115f9b3e(Stream x08414f6582e09cd6, xce35b386c226c822 xe2b23cef8facc460)
--- End of inner exception stack trace ---
Copying this file manually solves then the problem, after that other files waiting to transfer can then be downloaded. So it's definetly not a network/firewall problem. Any suggestions?
Using Aspose.Network 4.8.0.5...
Best regards,
Ivan
PS: Here's my code:
FtpClient ftpClient = null;
try
{
ftpClient = Connect();
if (ftpClient == null) return;
if (!ftpClient.Exists(strRemoteFilePath)) throw new FileNotFoundException();
ftpClient.Download(strRemoteFilePath, strLocalFilePath, true);
if (bDeleteRemoteFile && File.Exists(strLocalFilePath)) ftpClient.Delete(strRemoteFilePath);
}
finally
{
Disconnect(ftpClient);
}