SharePoint webpart中的浏览器中的Silverlight

时间:2011-09-27 18:03:14

标签: silverlight sharepoint-2010 silverlight-oob

我在SharePoint 2010网站中遇到了Silverlight webpart的问题。 Silverlight应用程序在网站中运行良好,甚至在浏览器之外。我遇到的问题是如何自动更新浏览器应用程序。我目前有这个:

        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);
        }
    }

但它在SharePoint时不会运行。我现在必须向我的所有用户发送一封电子邮件,因为他们可能正在使用浏览器中的这个应用程序并让他们卸载并再次安装它。这是否与SharePoint如何使用安全性有关?当用户双击桌面图标以打开oob应用程序时,它会提供凭据登录。我的猜测就是抛出自动更新的原因。

谢谢!

1 个答案:

答案 0 :(得分:0)

修复是签署xap文件并在验证发生后放置此代码!