Fixing mixed content errors caused by Media Player web part on a https site collection on Internet Explorer (On Premise)
Published May 01 2019 04:15 PM 671 Views

First published on TECHNET on Sep 28, 2018
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 ''. 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

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

Version history
Last update:
‎Sep 01 2020 03:43 PM
Updated by: