locked
Error while getting Thumbnail from ContactPicker: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) RRS feed

  • Question

  • Hi,

    I am using following code to get Thumbnail -

    1. private async void GetThumbnail(Contact contact)
    2.         {
    3.             if (contact.Thumbnail != null)
    4.             {
    5.                 IRandomAccessStreamWithContentType stream = await contact.Thumbnail.OpenReadAsync();
    6.                 if (stream != null && stream.Size > 0)
    7.                 {
    8.                     Thumbnail = new BitmapImage();
    9.                     Thumbnail.SetSource(stream);
    10.                }
    11.            }
    12.        }

    At line 5 it is throwing this error. As suggested on different blog posts, I tried turning off the Firewall but no luck. Please suggest.

    Update

    I found that using following code works, but it is Obsolete class

    var contactPicker = new ContactPicker();

    var contactInfos = await contactPicker.PickMultipleContactsAsync();
                foreach (var item in contactInfos)
                {
                    var imgStream= await item.GetThumbnailAsync();
                }

     Can anyone explain why this is working here?

    • Edited by Rahul534 Saturday, February 8, 2014 5:05 PM Update
    Saturday, February 8, 2014 12:32 PM

Answers

  • Hi Rahul534,

    Take a look at the documentation first: Quickstart: Selecting user contacts

    It seems that your code are correct, the exception thrown is a COM error message, could be a installation issue or a timing issue, but I believe if you running the same code in another machine, should be ok.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, February 10, 2014 9:12 AM
    Moderator

All replies

  • Hi Rahul534,

    Take a look at the documentation first: Quickstart: Selecting user contacts

    It seems that your code are correct, the exception thrown is a COM error message, could be a installation issue or a timing issue, but I believe if you running the same code in another machine, should be ok.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, February 10, 2014 9:12 AM
    Moderator
  • I am having the same problem. As it is occurring on my dev machine, I really need to fix the problem. I don't want to have to use the obsolete method as I'll still have to fix the problem beyond 8.1 anyway.

    Do you have any suggestions for investigating/resolving the  issue?

    Monday, March 17, 2014 7:59 AM