BackgroundTransferRequest.DownloadLocation Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the location to which the requested file will be downloaded.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
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. |
The following line of code illustrates the URI format required by this property.
Uri downloadUri = new Uri("shared/transfers/MyFile.xml", UriKind.RelativeOrAbsolute);
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 \shared\transfers directory. Only relative URIs are supported. The path cannot be zero length. |
ArgumentException | The path must end with a file name. The specified Uri must be of type UriKind.Relative. Absolute paths using the “isostore:” Uri schema are not supported. |
Caution: