无法从我的wp7设备通过LiveSDK将14mb文件上传到SkyDrive

时间:2013-04-07 14:54:01

标签: windows-phone-7 onedrive live-sdk

上传5mb文件不是问题,但是当我尝试上传14mb时,我的应用程序已关闭。

fileStream = // get some file as stream from isolated storage

uploadClient = new LiveConnectClient(session);
uploadClient.UploadCompleted += new EventHandler<LiveOperationCompletedEventArgs>(uploadClient_UploadCompleted);

uploadClient.UploadAsync("me/skydrive", "filename", fileStream, OverwriteOption.Overwrite, null);

异常(见屏幕截图):

A first chance exception of type 'System.NotSupportedException' occurred in System.Windows.dll
Addtional information: NotSupportedException"

enter image description here

当我使用BackgroundUploadAsync而不是UploadAsync时,文件被传输但是大小为0。

任何人都知道这个问题的解决方案吗?

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。

!!!这是重要的 应该仅从主应用程序线程

调用UploadAsync方法