BackgroundDownloader only downloading 5 at once

I create 1,000 downloads using BackgroundDownloader.CreateDownload, then I queue up 100 of them by doing DownloadOperation.Start. If I watch the traffic in fiddler, only 5 of them at actually send out at once. When one finishes, another is sent out.

Is there a way to have more sent out concurrently?

-------------Problems Reply------------

This could be a limitation of the server you are downloading from, not necessarily the code you are writing. With .htaccess rules the admin of the server could do something like this in order to limit concurrent connections: MaxClients < number-of-connections>

Yes, there is a limit of 5 downloads at a time within Windows.Networking.BackgroundTransfer.

You can extend it to up to 6 downloads at a time if you mark all your downloads as High Priority, i.e.:

var download = backgroundDownloader.CreateDownload(...);
download.Priority = BackgroundTransferPriority.High;
Task<DownloadOperation> task = download.StartAsync(...).AsTask();

Category:c# Views:1 Time:2018-07-06

Related post

Copyright (C), All Rights Reserved.

processed in 0.130 (s). 11 q(s)