I'm trying to upload a simple .cer file to SkyDrive. Regardless of the LiveConnectClient-Method
I use, nothing happens. There is no compile, runtime or other Exception and my app never receives a LiveOperationResult
. I'm using the emulator, and I'm able to log in to MS Live (so my internet connection is fine). Here is a excerpt of the code used:
using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
{
using(var fileStream = store.OpenFile(certPath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
try
{
client = new LiveConnectClient(session);
//LiveOperationResult operationResult = await client.UploadAsync("me/skydrive", certPath, fileStream, OverwriteOption.Overwrite, new System.Threading.CancellationToken(false), null);
LiveOperationResult res= await client.BackgroundUploadAsync("me/skydrive",
new Uri("/shared/transfers/cert.cer", UriKind.Relative),
OverwriteOption.Overwrite);
linkTextBlock.Text = "Done";
As mentioned before, the TextBlock
never Displays "Done". It makes no difference if the UploadAsync
or BackgroundUploadAsync
method is used.