Задайте вопросЗадайте вопрос
 

ОтвеченоException thrown when trying to access Profiles

  • 11 ноября 2008 г. 12:22Scott LovegroveMVPМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     С кодом

    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
    •  

Ответы

Все ответы