| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: GET Hangs On Large File Download |
| harry harry@gweiss.com From: Hartford, CT USA Posts: 3 Member Since: 12/30/02 |
posted December 30, 2002 2:03 PM My application hangs after downloading about 3.5MB of a 18.0MB file. I am using the progress event to track the byte count and after about 3.5MB the count slows, then stops, then times out with the message "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". Any ideas? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 30, 2002 2:21 PM Does it happen every time or where you able to retrieve the file at least once? Can you verify that you are able to retrieve this file using other FTP utilities? Can you provide the location of a publicly available file that I can try myself and see what happens? |
| harry harry@gweiss.com From: Hartford, CT USA Posts: 3 Member Since: 12/30/02 |
posted December 30, 2002 2:51 PM Yes, it hangs every time. The files that I download contain financial data, range from 0.5MB to about 20.0MB and are only available through a subscription service. The smaller files always download successfully. I have never been able to retrieve a file over about 15.0MB with PowerTCP.NET. I have successfully downloaded the larger files with Internet Explorer. Thanks for the prompt response. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 30, 2002 3:48 PM Please try to find a public site that causes the problem. Otherwise I will not be able to find the cause. Try ftp.cdrom.com or some other popular download site. If you can get it to fail, post the needed info here. Thanks. |
| harry harry@gweiss.com From: Hartford, CT USA Posts: 3 Member Since: 12/30/02 |
posted December 31, 2002 10:57 AM Problem is resolved thanks to your leading me in the right direction. I had no problem downloading a large file from another public site with PowerTCP. On the other hand, WS-FTP also failed to download my original target file on the initial attempt, but did an automatic retry which was successful. Turns out my host server was very busy and had frequent timeouts. By adding an error handler and using .Restart=True I was able to eventually download the complete file. Thanks again. |
| pvestuto From: Kildeer, IL USA Posts: 44 Member Since: 07/03/01 |
posted October 13, 2003 4:47 PM Regarding the RESTART property, it behaves as a GET property. Therefore, how can you set .RESTART=TRUE? As far as performing restart logic, do you need to add logic to the error event handler to determine an error occurred and to restart the STORE command using the value of a variable loaded by the progress event? It didn't seem like restart was an automatic thing, and that the progress event doesn't go off on an error condition, even though some of the samples check for an error in the progress event handler. Is there a comprehensive example detailing how to perform a FTP send which retries on an error condition? thanks, - Paul - Paul@dmaxx.com |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 13, 2003 4:56 PM It's read-only. If the server supports Restart, it's true, if not, it's false. The only way to change it would be fix the Ftp Server so that it support Restart. Check the FtpListView sample. If the server supports Restart we restart the file at the point where the transfer left off, which is calculated by comparing the differences between the local file and the remote file. |
| pvestuto From: Kildeer, IL USA Posts: 44 Member Since: 07/03/01 |
posted October 13, 2003 5:42 PM The ListView example sends a Marker value of RemoteFileSize. However, doesn't this require the user to kick off the file transfer again afer a failure? I have a utility program that uses the WININET API to send files. It works most of the time but in the case where a transmission hickup occurs, the entire transfer fails (even if it's 99 out of 100Mb there). Hence, I'm looking to replace the WININET API with Restartable FTP and doing so with the DART FTP Tool. However, it seems my utility would have a log of logic built in to the DART FTP control event handlers to know what was happening, detect an error condition, and attempt a restart of the transfer. Agree? The STORE command with a marker value is relatively easy to code. Knowing when to send a marker value, and at what value, is a bit tougher. Thanks for your comments so far, I look forward to your response. - Paul - |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 13, 2003 10:22 PM Please look at the code where we calculate the marker. That should help. |
| pvestuto From: Kildeer, IL USA Posts: 44 Member Since: 07/03/01 |
posted October 14, 2003 7:45 AM The code I see is the following from the DoStore Sub: If m_Item Is Nothing Or unique Then RemoteFileSize = -1 Else RemoteFileSize = Val(m_Item.ListSubItems(1).Text) End If This gets the file size of the remote file (if there). If the transmission fails, the user re-executes the Store command, and the code sends a marker value representing the size of the remote file (if there). I get it. This requires a second interaction by the user. Right? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 14, 2003 8:35 AM In this sample yes, but it doesn't have to be that way. It could be automated with a littel work. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|