Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LiveConnectClient.BackgroundDownloadAsync(String) method

Performs a download of a file with a given path. [Windows Store apps only]

Note  Windows Phone doesn't support this method.

Syntax


public Task<LiveDownloadOperationResult> BackgroundDownloadAsync(
  string path
)

Parameters

path

Type: System.String

The relative path to the item to download.

Return value

Type: Task<LiveDownloadOperationResult>

The LiveDownloadOperationResult that contains the file contents.

Error codes

NameMeaning
ArgumentNullException

A parameter that was passed in is null.

Remarks

This is a helper function that makes calls to the Live SDK Representational State Transfer (REST) API. It supports all paths in the REST API.

BackgroundDownloadAsync automatically uses the access token returned from user sign-in by the constructor, making it possible for a site to omit working directly with access tokens. If the access token cookie is set, BackgroundDownloadAsync uses that as well.

Important  Before calling this method, your code must call either the LiveAuthClient.InitializeAsync or LiveAuthClient.LoginAsync method with, at minimum, the corresponding necessary scopes for [downloading | uploading | copying | deleting | reading | moving | creating | updating] the corresponding [data | files | file]. If you don’t, the call to this method may fail.

Requirements

Minimum supported client

Windows 8

Minimum supported server

None supported

Namespace

Microsoft.Live

Assembly

Microsoft.Live.dll

See also

LiveConnectClient

 

 

Show:
© 2015 Microsoft