Click here to Skip to main content
15,888,210 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
So Im trying to upload an audio file (3 megabytes) using the Live SDK in Windows Phone 7. Everything works fine until the upload is finish where it always throw an ObjectDisposeException. But the file is on the skydrive correctly and gets to 100% upload is just that it throws the exception even in a try catch.

code:
C#
client.BackgroundUploadAsync("me/skydrive/",
                  new Uri("/shared/transfers/" + song.ID, UriKind.RelativeOrAbsolute), OverwriteOption.Rename, "mdfs");


Any ideas?
Posted
Comments
Ed Nutting 2-Sep-12 14:55pm    
Hmm...it's an Async operation so my bet is that there is a possible bug in the SDK that means that when it's 100% uploaded, the uploader thread tries to access it's creator thread by which point that creator thread has been disposed of and so you get the error. Certainly the reason a try-catch block doesn't work for you is because Async creates a new thread on which the error is then occurring. I will not explain threading here as there are many articles on it but it means the error jumps all the way up to the process as a whole and any try-catch block round the code you present is completely irrelevant - it's hard to explain without explaining threading as a whole - please read up on it as an issue. My advice would be to check the SDK forums (by searching in Google or on the SDK's development site) to see if this is a known issue or if other have come across it/solved it.

Ed
Zumicts 15-Sep-12 20:57pm    
Been searching on google for a few days and nothing so far.... Anybody has been able to solved this?

1 solution

Firt you shoud copy the song to the directory /shared/transfers/ ,then upload
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900