Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: Check File
unknowniam

From: raleigh, NC USA
Posts: 3
Member Since: 06/29/05
posted July 19, 2005 3:43 PM

Subject: Check the file exists in the remoate FTP server

Question: We are having some protocol issues with Remote FTP server and they are not willing to work with us.
 When we upload a file to remote server for example schedule1 it reaches the remote server but does not return back message saying it reached the Remote server.
  Is their any way to compare files and say that the file reached the reamote server and supress the exception.

Thank you
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 19, 2005 4:07 PM

I guess you could do Listing and compare the file sizes. Do you know why they are not sending you the response?
unknowniam

From: raleigh, NC USA
Posts: 3
Member Since: 06/29/05
posted July 20, 2005 9:12 AM

We send the file in active mode and Dart FTP wait for the return message

Below is the messgae from Dart help.
-----
Thanks.
I tested with this version of the dll and our most current internal dll.
There was no difference in the results.
Here is what I have found:

The Put does timeout about once every 50 attempts.
The code I used for storing the file is below (I used a timeout of 10000).
When the timeout occurs, it is because the server has failed to send a 226 response within 10 seconds of the transfer completing.
Every time it failed, the file was complete on the server.
With transfers, the server initially sends a 150 response to tell the client the transfer is starting.
After the transfer completes, the server must send a 226 response.
When the timeout occurs, it is because this response is not received in a timely fashion.

As I said, this occurs rarely, which is most likely why you have not seen it with other Ftp clients.
But it does look to be a problem with the server.

Here is my recommendation:
The way you should handle this is to simply catch the error, and then login again and resume whatever else needs to be done.
You may want to do a List on the file after logging back in and check the size, just to be sure it was transferred in full.
The re-connect is necessary because this is a timeout on the command connection (not data connection).
It is possible that the server will eventually response with the 226, and it you had sent another command in the meantime, there will be an out-of-synch problem.

Hope it helps,
---------------------------------------

So rahter than waiting for message we are planning to verify that the file we send is the file is in the remote server. Any idea. thank you
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX