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.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Parameters
- requestUri
- Type: System.Uri
The URI of the requested file.
- downloadLocation
- Type: System.Uri
The location to which the requested file will be downloaded.
Caution: |
|---|
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. |
Caution: