0

It's not a problem to upload 5mb file but when I try to upload 14mb my application is down.

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);

Exception (see screen shot):

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

enter image description here

When I use BackgroundUploadAsync instead UploadAsync the file is transferred but has size 0.

Anyone knows the solution of this problem?

mktn
  • 23
  • 3

1 Answers1

0

I found the solution.

!!!IT's IMPORTANT The method UploadAsync should be called only from main application thread

mktn
  • 23
  • 3