Project DescriptionBitsMonitor is simple C# 2.0 app that uses BITS to download files from web.
It's main goal is to monitor and manage all downloads (start / suspend, cancel).
New downloads may be added from application itself or a command line arguments.
What is it for?The idea behind BitsMonitor is to use Windows built-in technology called Background Intelligent Transfer Service to download files from web. BitsMonitor may be called a wrapper for a BIT service. What it does is only creates jobs, add links to the file user wants to download and… gets information about downloading progress from BITS. Nothing more. No downloading code, no resuming, no nothing basically. The only thing that BitsMonitor tries to do is to resume (restart) jobs (it does it by monitoring downloads) if downloading error occurs. What makes it worth interesting? At the beginning I wanted to create a Firefox plug-in (I do not use IE almost at all so the choice was obvious) but after looking more carefully at all features offered by Flashgot (Mozilla Firefox plug-in) I realized that support for passing command line arguments to any executable is just what I need.
It became even easier than I thought: Although Flashgot detects automatically whole bunch of download managers, and configures them (so after installation of the plug-in they are ready to use from Flashgot), there is another possibility: Flashgot allows passing arguments to chosen executable, and it is up to developer what kind of argument prefixes they want to use. There are a few arguments you may want to pass to your application: URL, referrer URL, Cookie, Destination folder, POST data, URL list file and cookies.txt file. I use only two of them: destination folder and URL.
Configuring BitsMonitor for using with Flashgot
"Command line argument template" should contain: "--url:
URL --dir:
FOLDER" (check it again after hitting OK - sometimes the last argument is being lost...)
Limitations.This app is really simple. It is not able to download files if there is some magic with JavaScript that gives the proper file URL (i.e. BitsMonitor is not able to download files from Codeplex, but all downloads from MSDN are handled very well). BITS is able to download and upload files, but BitsMonitor was designed only as a download-alike tool.
LiceneseThis app and all the source code is freely available for anyone. I have used code (BITS Interop) provided by J. Clark in his MSDN Magazine article
http://msdn.microsoft.com/en-us/magazine/cc188766.aspx. If you think, I have violated the license - please let me know, or inform Codeplex administator - so this page could be blocked until everything will be clear.
I was looking for an information about license under which all sources shown on MSDN Magazine are published - but I didn't find anything.