Reputation: 53
I need to download file from website to iso storage.
I found 3 ways, BackgroundTransfer
, WebClient
and HttpWebRequest
, but none of these 3 ways can pause and resume downloading.
On the other hand, the 3 ways all write stream downloaded after download is complete.
How to achieve breakpoint to resume download?
Upvotes: 0
Views: 1462
Reputation: 1867
I dont know on which platform you are working, i mean you are working on windows phone 8/7 or desktop applications. In my senario if you are working on windows phone 8 than you can use the TransferControl on UI and BackgroundTransferRequst in xaml.cs. BackgroundTransferRequest has the capability to resume or pause the download. Read following link.
Click here for TransferControl in windows phone 8 and BackgroundTransferRequest.
Use HttpClient inplace of webClient, with HttpClient you can do pause and resume during download file.
Upvotes: 1