SharePoint Web 部件中的 Silverlight 在浏览器之外
我的 SharePoint 2010 网站中的 Silverlight Web 部件存在问题。 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 应用程序时,它确实会提供登录凭据。我的猜测是这就是阻止自动更新的原因。
谢谢!
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 credential login. My guess is that's what's throwing off the auto update.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
修复方法是对 xap 文件进行签名并在身份验证发生后放置此代码!
The fix was to sign the xap files and place this code after authentication takes place!