使用反向代理在SharePoint托管的Silverlight应用程序中显示混合内容

时间:2012-04-02 18:07:00

标签: silverlight sharepoint load-balancing reverse-proxy

我有一个可通过互联网访问的SharePoint网站。在内部,http请求被路由到https reauest,并且在我们的负载均衡器/反向代理设备上卸载SSL。除Silverlight应用程序外,一切都运行良好。

此应用程序托管在其中一个页面上,当页面在浏览器中加载时,它会连接到SharePoint列表以检索其数据。此时,IE弹出一个窗口,显示“显示混合内容”。显然,它认为页面上有http和https内容的混合。

这是否意味着我将不得不通过SSL托管Web服务(并将其传递给SharePoint服务器)并且不让反向代理处理它?或者,这种情况的解决方法是什么?

1 个答案:

答案 0 :(得分:0)

以下是我用来解决此问题的代码:

  

_siteURL = System.Windows.Browser.HtmlPage.Document.DocumentUri.AbsoluteUri.StartsWith(“https:”)   ? SP.ApplicationContext.Current.Url.Replace(“http”,“https”):   SP.ApplicationContext.Current.Url;

这允许我的Silverlight应用程序在外部(通过我们的F5 /反向代理)和内部工作在我们的SharePoint(扩展)基于表单的站点上。