1

I would like your opinions on what the best/fastest way to download files from a webserver would be?

I have used WebClient. but most of the time it downloads slower than my web broswer...

WebClient c = new WebClient();
using(c)
{
     c.DownloadFile("http://blahblah.com/somefile.html", "righthere.html");
}
  • post the code your have. Then we can see if its your code making it go slow – EKS Feb 13 '10 at 22:08
  • 1
    thank you - please see updated question for code. –  Feb 13 '10 at 22:17
  • possible duplicate of [HTTPWebResponse + StreamReader Very Slow](http://stackoverflow.com/questions/901323/httpwebresponse-streamreader-very-slow) –  Jul 27 '12 at 10:51

1 Answers1

2

Have you tried the sample code for HttpWebRequest() from msdn doc? I've used it literally billions of times with fantastic results. Define slower-- Twice as long? Are you counting your browser start time in your comparison?

No Refunds No Returns
  • 8,092
  • 4
  • 32
  • 43
  • 1
    Thanks for the mention... Yeah, I have been counting... Very impatiently. It took 1 second for Internet Explorer 8 on Windows 7 to display Google.com (after i deleted all internet history etc). And it took more than 15 seconds for WebClient –  Feb 13 '10 at 22:26