Results 1 to 3 of 3

Thread: How to stop a download(not cancel) and then contue it ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    9

    How to stop a download(not cancel) and then contue it ?

    Hello guys,

    Im currently working on my downloader and also have a few things, but i need a code which can stop the download and then continue it again. Perhaps it will be also possible when you stop the Backgroundworker, because he controls the whole download action ?

    If you need my Form Code to help me, I will post it
    Last edited by Flow96; Jun 8th, 2011 at 03:01 PM.

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: How to stop a download(not cancel) and then contue it ?

    First of all, the site that you are downloading from must support pausing and resuming. How do you check that? You need to see if the server sends a Accept-Ranges: bytes header.

    How do you resume? Well if the server supports ranges then when you create the request you skip the amount of bytes you've downloaded with the AddRange method.

    Here are a couple useful links to get you started:

    http://stackoverflow.com/questions/1...ttpwebresponse

    http://www.codeproject.com/KB/vb/FileDownloader.aspx

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    9

    Re: How to stop a download(not cancel) and then contue it ?

    Thank you for the links, but its not so easy for me to understand it because im a beginner and the tutorial is in english , but I will give it a try

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width