0

上传 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"

在此处输入图像描述

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

有谁知道这个问题的解决方案?

4

1 回答 1

0

我找到了解决方案。

!!!IT's IMPORTANT 方法 UploadAsync 应该只从主应用程序线程调用

于 2013-04-07T18:46:19.463 回答