MSDN > Home page del forum > Live Framework > Exception thrown when trying to access Profiles
Formula una domandaFormula una domanda
 

Con rispostaException thrown when trying to access Profiles

  • martedì 11 novembre 2008 12.22Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Contiene codice

    I've just been doing a quick demo silverlight app for mesh which I was planning on making the same as my console app. However, I'm getting an exception thrown whenever I try and access the Profiles object of the Live Operating Environment. I have set the application's settings as described by Danny, but this does not change anything. The start of my code is this:

                InitializeComponent(); 
     
                MeshApplicationService meshApp = Application.Current.GetMeshApplicationService(); 
                // once mesh contents are loaded we get callback 
                meshApp.LoadCompleted += new EventHandler(meshAppLoaded); 
                meshApp.Load(); 
                 
                LiveOperatingEnvironment loe = meshApp.LiveOperatingEnvironment; 
                 
                // This gets the Messenger PSM 
                Profile prof = loe.Profiles.Entries.Single(e => e.Resource.Title == "GeneralProfile"); 
                var somethingelse = (GeneralProfile)prof.Resource.ProfileInfo; 


    When debugging, just looking at the loe object, the Profiles attribute just says that it threw an exception.

    Any thoughts?

    SL - Windows Live Platform MVP
    •  

Risposte

  • venerdì 21 novembre 2008 16.59Vikas-AhujaMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    Scott,  This error should be fixed with the latest build deployed last night. Please try it out!
    This posting is provided "AS IS" with no warranties, and confers no rights.

Tutte le risposte

  • martedì 11 novembre 2008 17.48Danny ThorpeMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Scott,

    Are you running this mesh app in Live Desktop (in the browser) or on the local LOE on your local desktop?  I don't think Profiles (or Contacts) are supported yet on the local LOE.

    -Danny
    http://dannythorpe.com
  • martedì 11 novembre 2008 18.38Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Danny,

    This is when using the Live Desktop, not the local Mesh client.
    SL - Windows Live Platform MVP
  • martedì 11 novembre 2008 21.55Vikas-AhujaMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    I suspect this is permissions issue. can you verify that using LivefxResourceBrowser that you have following Permission, highlighed:

          <InstalledApplicationResourceContent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://user.windows.net">  
            <Offers> 
              <Offer> 
                <OfferName>DeveloperCTPProfiles.Read</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPDevices.Read</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPContacts.Write</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPNews.Full</OfferName> 
              </Offer> 
            </Offers> 
            <Version>2</Version> 
          </InstalledApplicationResourceContent> 
      

    Danny has provided a work around for fixing permissions:
    http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/695f4201-7ab3-4942-bf45-b929f75f2237


    If above is true, similar issue was:
    http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/f16a1d6f-91b5-4082-945c-0fdee0796c09

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • martedì 11 novembre 2008 23.23Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Vikas,

    Thanks for the reply. I will verify with the LivefxResourceBrowser when I'm next on the PC with my project on it. I did however already do the steps described in Danny's post and the permissions were all set correctly after that (including access to the profiles).

    In the Apps settings on the website, I have the following:

    Permissions
    Read access to my Windows Live Profiles
    Read access to my Live Mesh Devices
    Read and update access to my Windows Live Contacts
    Full access to my Live Mesh User News

    I can still double check with the resource browser, but they do look correct there.

    PS. It was me who 'started' the similar thread you mentioned :)




    SL - Windows Live Platform MVP
  • mercoledì 12 novembre 2008 2.05Mine Tanrinian Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
     Hi Scott,

    I have seen the same result as you did when trying to access Profiles with the correct permissions within a Mesh-enabled Silverlight application. 

    I have then attempted to implement the same steps through WPF Application and I was able to access the Profiles object after connecting to LiveOperatingEnvironment by passing in the correct Network Credentials.

    This behaviour reminded me the response given for New MeshObject does not look initialized and Add throws thread. Vikas, can you please confirm whether this is the expected result in the case of Profiles too?

    Thanks,
    Mine
  • mercoledì 12 novembre 2008 17.34Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Contiene codice

    Hi Vikas, 

    Yes, I can confirm that my settings are as shown:

          <InstalledApplicationResourceContent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://user.windows.net"
            <Offers> 
              <Offer> 
                <OfferName>DeveloperCTPProfiles.Read</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPDevices.Read</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPContacts.Write</OfferName> 
              </Offer> 
              <Offer> 
                <OfferName>DeveloperCTPNews.Full</OfferName> 
              </Offer> 
            </Offers> 
            <Version>2</Version> 
          </InstalledApplicationResourceContent> 
     

    SL - Windows Live Platform MVP
  • giovedì 13 novembre 2008 17.31Danny ThorpeMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Scott,

    I've repro'd this issue here.  It looks like meshApp.LiveOperatingEnvironment.Profiles is broken in the Silverlight Live Framework client lib.  Any access to the Profiles property throws, even with DeveloperCTPProfiles.Read access.  We're investigating.

    Please log this as a bug so you get credit for finding it. ;>

    -Danny


    http://dannythorpe.com
  • giovedì 13 novembre 2008 17.40Vikas-AhujaMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Thanks Danny.

    Scott, Please log a bug on this issue using our connect site.

    FAQ thread provides the information on how to log bugs.
    http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/534719b4-4965-4d73-a18b-59c10f74e457
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • giovedì 13 novembre 2008 23.46Nishant GuptaMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
     This has been captured as a bug in our database and will look into it.

    Program Manager - Live Services / Live Framework
  • venerdì 14 novembre 2008 9.14Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Excellent, thanks :)
    SL - Windows Live Platform MVP
  • venerdì 21 novembre 2008 16.59Vikas-AhujaMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    Scott,  This error should be fixed with the latest build deployed last night. Please try it out!
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • venerdì 21 novembre 2008 17.06Scott LovegroveMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Yep, that has indeed fixed it :) Thanks :)
    SL - Windows Live Platform MVP