This topic has not yet been rated - Rate this topic

BackgroundTransferService.Add Method

Windows Phone

March 22, 2012

Adds a background transfer request to the queue.

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
public static void Add(
	BackgroundTransferRequest request
)

Each application can have only five requests queued at a given time. Attempting to add a request after this limit has been reached will throw an exception. It is the responsibility of the application to remove requests from the queue by using the Remove(BackgroundTransferRequest) method after they have completed.

This method may throw one of the following exceptions.

ArgumentNullException

The request argument cannot be null.

InvalidOperationException

The request has already been submitted.

The maximum number of requests per application has been reached.

A request with the same DownloadLocation URI has already been submitted.

The user has disabled background tasks in the device’s Settings.

SystemException

The maximum number of requests on the device has been reached.

The underlying transport layer returned an error.

The underlying transport layer returned an error related to the content-range request or response.

Windows Phone OS

Supported in: 7.1

Windows Phone

Did you find this helpful?
(1500 characters remaining)