New to Telerik UI for ASP.NET AJAX? Download free 30-day trial



In certain cases, e.g. the web server is behind a load balancer, which is the SSL endpoint, the generated links to the web resources are non-secure. (SSL terminates on the load balancer and the web server receives a non-secure request, so it generates non-secure links.)


In these cases, a solution is to force secure links by setting the BaseUrl property to the value of the BaseSecureUrl. There are three alternative ways of doing this (identically applicable to RadStyleSheetManager).

The URL values used in the examples below are the official CDN links for the Styles and Scripts explained in CDN support overview. If you use a Custom CDN Provider, you can use your custom link instead.

Solution 1 - Globally in the web.config file

    <!-- use secure Telerik CDN for scripts -->
    <add key="Telerik.ScriptManager.TelerikCdn.BaseUrl" value=""  />   
    <add key="Telerik.ScriptManager.TelerikCdn.BaseSecureUrl" value=""  />
    <!-- use secure Telerik CDN for styles and images -->
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseSecureUrl" value="" />
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseUrl" value="" />

Solution 2 - Page setup in the markup

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <CdnSettings TelerikCdn="Enabled" BaseUrl="" />
<telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1">
    <CdnSettings TelerikCdn="Enabled" BaseUrl="" />

Solution 3 - Page setup from the code-behind

protected void Page_Init(object sender, EventArgs e)
    RadScriptManager1.CdnSettings.BaseUrl = RadScriptManager1.CdnSettings.BaseSecureUrl;
    RadStyleSheetManager1.CdnSettings.BaseUrl = RadStyleSheetManager1.CdnSettings.BaseSecureUrl;

Protected Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
    RadScriptManager1.CdnSettings.BaseUrl = RadScriptManager1.CdnSettings.BaseSecureUrl
    RadStyleSheetManager1.CdnSettings.BaseUrl = RadStyleSheetManager1.CdnSettings.BaseSecureUrl
End Sub

See Also

In this article