Hey Guys.
Im reading up on the tutorial here:
http://www.geekpedia.com/tutorial179_Creating-a-download-manager-in-Csharp.html
I havnt copied that code exactly.. but i know i got all what is required right.. I just used a different windows form that already knows what files to download.
Basicly im just using a new thread to loop through the Download method to download files from a HTTP server.
It works all fine, On my local computer.. using http://localhost/filename.txt
But if i upload them to my webserver. When the app loops through the files it downloads the first ok.
But then when it gets to download the second file it stops at the line:
strResponse = wcDownload.OpenRead(FileURL);
After awhile it just times out and crashes.
Does anyone know what might be wrong? Please any sort of help would be greatly appriciated!
Thanks, Andy.
I could get this to run the first file, then freeze up when I tried to do a second download. Sounds like the same problem. You need to close the HTTPResponse right after getting it. Something like:
webResponse = (
webResponse.Close();
fileSize = webResponse.ContentLength;
HttpWebResponse)webRequest.GetResponse();I was having the same problem, poked around everywhere, finally figured it out, then saw someone had already noted it in the responses to the original (V1) post. Darn. That'll teach me to work on my reading comprehension
George B