Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Which of the following method to retrieve a file from server is fast and efficient ?

1- FtpWebRequest
2- WebClient

Thanks for your time.

Regards.
Posted

1 solution

They are both limited by network speed and YOUR handling of the stream. On top of that, FtpWebRequest can only get data from FTP's, and web request can only get them from a web server (http), so which one you use depends on where the file is located more than speed.

[Edit]

Both FtpWebRequest and WebClient.DownloadFile use the same underlying class to download data from the internet, WebRequest. So both methods are exactly the same after the transfer starts.
 
Share this answer
 
v2
Comments
RaisKazi 21-Nov-13 11:33am    
My 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900