Hello
Problem: I need to download files from an FTP site while moving very fast.
I expect connection problems during downloads. If a file is half downloaded and there is a connection glitch, then the file needs to be downloaded fully once again. Likewise, different actions have to be taken based on the error.
How to handle error cases using WebClient.Downl oadFile? Or are there any other better APIs?
--- sample code ---
WebClient fileGetter = new WebClient();
fileGetter.Cred entials = new NetworkCredenti al(userName, passWord);
//download files
fileGetter.Down loadFile(source , destPath);
----
Problem: I need to download files from an FTP site while moving very fast.
I expect connection problems during downloads. If a file is half downloaded and there is a connection glitch, then the file needs to be downloaded fully once again. Likewise, different actions have to be taken based on the error.
How to handle error cases using WebClient.Downl oadFile? Or are there any other better APIs?
--- sample code ---
WebClient fileGetter = new WebClient();
fileGetter.Cred entials = new NetworkCredenti al(userName, passWord);
//download files
fileGetter.Down loadFile(source , destPath);
----
Comment