Freigeben über


Fixing mixed content errors caused by Media Player web part on a https site collection on Internet Explorer (On Premise)

This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support team

If you are using a Media Player web part on a SharePoint site over HTTPS you may see an error “The page at 'https://sp/Pages/Default.aspx' was loaded over HTTPS, but requested an insecure image 'https://download.microsoft.com/download/d/2/9/d29e5571-4b68-4d95-b43a-4e81ba178455/2.0/ENU/InstallSilverlight.png'. This content should also be served over HTTPS.

This error message is displayed when Silverlight is not installed on the System.

We ran into a scenario with a customer where they could not install Silverlight on the user’s machines and also had to avoid the mixed content error.

We tried a couple of options of hiding / removing the Silverlight prompt via CSS / JavaScript. However, the mixed content error seems to be thrown even before the DOM ready event happens so any modifications in CSS / JavaScript are too late.

After further research we found that SharePoint provides a configuration to control this. The Web Application has a configurable property “AllowSilverlightPrompt” that will control if the download Silverlight prompt can be loaded or not. By default, this is set to true.

We ran the below PowerShell to change this to false and this fixed the mixed content error message.

 $webApp = Get-SPWebApplication "https://sp"
$webApp.AllowSilverlightPrompt = $false
$webApp.Update()

Note that this is a server-side API and hence is applicable to SharePoint On-Premise only.