views:

94

answers:

2

Hi All

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");
}
+2  A: 

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
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
lucifer
Excellent. HttpWebRequest works great! Thank you.
lucifer