(I'm working on a Windows Phone 7 using the LiveSDK - is this the right forum?)
The code pasted below is from SDK examples. I'm doing two things (1) a Windows live sign-in and (2) a PhotoChooserTask. There are some problems...
The sign-in only works if the phone is connected to my computer.
The chooser only works if I disconnect the cable from the comoputer.
So to get it to run as far as it will I deploy to the phone. run the application again from the phone with the cable connected. I get signed in. Then, before I hit the choose button (btnChoosePic) I have to remove the cable. The chooser
runs. I choose a Pic an then I get "error uploading file: Client_Error.
What is wrong?
public partial class MainPage : PhoneApplicationPage
private LiveConnectClient Client;
private void btnSignin_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
if (e.Status == LiveConnectSessionStatus.Connected)
Client = new LiveConnectClient(e.Session);
infoTextBlock.Text = "Signed in.";
Client.GetCompleted += new EventHandler<LiveOperationCompletedEventArgs>(Client_GetCompleted);
from what I can fathom you have a network connectivity issue w/ your phone. It works when connected to the computer because the USB cable acts as a tether; you're using your computer's internet connection.
Then you must disconnect from PC because you can't open photo hub while syncing. So you do that to pick your photo. Immediately after picking the photo, you attempt an upload, but you don't have network connectivity when you're disconnected from your PC
You can do a couple of things to make this test scenario work for you:
1) Detect network connectivity BEFORE attempting the upload. Prompt the user.
2) Add another step after picking the photo that requires user interaction to kick off the upload. Obviously, connect the phone to your PC before clicking this button and after picking a photo.