BackgroundTransferRequest Constructor (Uri, Uri)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the BackgroundTransferRequest class with the specified request URI and download file location.

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Sub New ( _
    requestUri As Uri, _
    downloadLocation As Uri _
)
public BackgroundTransferRequest(
    Uri requestUri,
    Uri downloadLocation
)

Parameters

  • downloadLocation
    Type: System..::.Uri
    The location to which the requested file will be downloaded.

Remarks

Warning

To help isolate the files to which the background transfer service has access, all transfers must be downloaded to a file within the \shared\transfers directory in the application’s isolated storage. You can add additional directories under this directory, but attempting to set a URI that is outside of the transfer directory will throw an exception.

This method may throw one of the following exceptions.

InvalidOperationException

A transfer request’s properties cannot be modified after it has been submitted or disposed.

NotSupportedException

The path must point to a location within the Transfers directory. Only relative URIs are supported. The path cannot be zero length.

ArgumentException

The path must end with a file name.

ArgumentNullException

The request URI cannot be null.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

BackgroundTransferRequest Class

BackgroundTransferRequest Overload

Microsoft.Phone.BackgroundTransfer Namespace