Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7061837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:31:20+00:00 2026-05-28T04:31:20+00:00

We are using the Live Connect SDK 5.0 to retrieve pictures from SkyDrive from

  • 0

We are using the Live Connect SDK 5.0 to retrieve pictures from SkyDrive from our Windows Phone 7.5 application.

The application code (simplified) below used to work until a few days ago. Now when we try to access the imageStream (or any other information captured in a callback) we get a System.Argument exception (HResult = -2147024809, “Value does not fall within the expected range”, but as usual the offending value is not mentioned). We checked our code base and there were no code changes in this area of the product recently.

Were there any API changes? Is there a way (Fiddler, but for applications not IE) to inspect the network traffic in the hope that more information is transmitted from the server? Are there any local values that are being cached that might interfere?

Here’s the relevant code:

public partial class OptionsPage : PhoneApplicationPage
{
    private LiveConnectClient _liveClient = null;

    public OptionsPage()
    {
        InitializeComponent();
    }

    private void OnSessionChanged(Object sender, LiveConnectSessionChangedEventArgs args)
    {
        if (args != null && args.Session != null && args.Session.Status == LiveConnectSessionStatus.Connected)
        {
            this._liveClient = new LiveConnectClient(args.Session);
        this.GetUserPicture();
        }
    }

    private void GetUserPicture()
    {
        var memoryStream = new MemoryStream();
        _liveClient.DownloadCompleted += new EventHandler<LiveOperationCompletedEventArgs>(this.GetUserPictureCallback);
        _liveClient.DownloadAsync("/me/picture?return_ssl_resources=true", memoryStream, memoryStream);
    }

    private void GetUserPictureCallback(object sender, LiveOperationCompletedEventArgs e)
    {
        _liveClient.DownloadCompleted -= this.GetUserPictureCallback;

        try
        {
            if (e.Error == null)
            {
                MemoryStream imageStream = e.UserState as MemoryStream;
                BitmapImage b = new BitmapImage();
                b.SetSource(imageStream);
            }
            else
            {
                MessageBox.Show(e.Error.Message, "Windows Live Error", MessageBoxButton.OK);
            }

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "SkyDrive Exception", MessageBoxButton.OK);
        }
    }
}

And the SignInButton is defined as follows:

        <live:SignInButton Content="Button" Height="65" HorizontalAlignment="Left" Margin="110,41,0,0"
            Name="signInButton1" VerticalAlignment="Top" Width="215" ClientId="[REAL_CLIENT_ID]" 
            Scopes="wl.offline_access wl.signin wl.basic wl.skydrive wl.skydrive_update"
            RedirectUri="https://oauth.live.com/desktop"
            Branding="Skydrive"
            TextType="SignIn"
            Background="Red"
            SessionChanged="OnSessionChanged" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:31:21+00:00Added an answer on May 28, 2026 at 4:31 am

    It appears that I was using the Beta version of the Live Connect SDK 5.0. Once I upgraded to the RTM version (and made the code changes required) it started working again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the REST API from Windows Live Connect. I can get all contacts
I'm trying to get the access token from the windows live connect api by
I am trying to send an email using the below code: s = smtplib.SMTP(smtp.live.com,587,
I am trying to connect to Windows Live Messenger using Smack, using the sample
I'm using AVPlayer to play live audio streamed from the Internet, but when it's
I am using this code to post some data $('.update_btn').live(click,function() { var ID =
I am using Lemonstand (an e-commerce CMS) and after going live with our site
First, I am using Live connect, as documents says live id will be obsolete
I am using OpenPop.net to try and parse our links from all the emails
I'm trying to create a sub folder using the Live Connect API for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.