I have posted about this in the past, and it was never resolved so I thought I would try again. I am connecting to a UNIX ProFtpd server and sending queries on the file size of many files. I am receiving the following error:
Aspose.Network.Ftp.FtpException was unhandled
Message="Receive command failed:Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
My initial process was
1. Create a connection
2. Call sub procedure to check the file size
3. In sub, check to see if the connection is open, if not then open it.
4. Check the file size and return it to the calling procedure.
After receiving the above error I modified it to
1. Call sub procedure to check the file size
2. In sub, close any existing connection, create a new instance of FtpClient and open that new instance.
3. Check the file size and return it to the calling procedure.
I am still receiving the error message above. The error occurs when I check to see if the file exists before running a query on it's size.
If _ftp.Connected Then
_ftp = New Aspose.Network.Ftp.FtpClient("myhost", "username", "password")
If Me._ftp.Exists(filename) Then 'Error occurs on this line
'Do work here
Please look into this and let me know what you find. Thanks!