开发者

Silverlight out of browser in SharePoint webpart

I have an issue with my Silverlight webpart in a SharePoint 2010 site. The Silverlight app works great in the site and even out of browser. The issue I'm having is how to autoupdate the out of browser app. I currently have this:

        if (Application.Current.IsRunningOutOfBrowser)
        {
            App.Current.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(Current_CheckAndDownloadUpdateCompleted);
            App.Current.CheckAndDownloadUpdateAsync();
        }

        void Current_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
    {
        if (e.Error == null && e.UpdateAvailable)
        {
            MessageBox.Show("Application updated, please restart to apply changes.");
        }

        if (e.Error != null)
        {
            MessageBox.Show(e.Error.Message);
        }
    }

but it doesn't run when it's SharePoint. I have to currently send out an email to all of my users thay may be using this app out of browser and have them uninstall and install it again. Does this have something to do with how SharePoint uses security? When a user double clicks on the desktop icon to open the oob app, it does give a credent开发者_运维技巧ial login. My guess is that's what's throwing off the auto update.

Thanks!


The fix was to sign the xap files and place this code after authentication takes place!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜