This is a migrated thread and some comments may be shown as answers.

SSL CDN Support for MVC Controls

6 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aaron
Top achievements
Rank 1
Aaron asked on 13 Aug 2012, 10:53 PM
Hi,

My sites are HTTPS, however are behind a load balancer which terminates the SSL connection, so the Telerik script manager for MVC controls loads the non-SSL CDN endpoint. I can't seem to find a way to force SSL connections for MVC CDN assets.

I am using the following syntax to register the scripts:

<%= Html.Telerik()
        .ScriptRegistrar()
        .DefaultGroup(group => group.UseTelerikContentDeliveryNetwork(true))
%>

How do I force SSL?

Thanks,

Aaron

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Aug 2012, 01:59 PM
Hello,

 The ScriptRegistrar should manually detect SSL connection by checking the IsSecureConnection property. Can you confirm that the value of this property is correctly set to true at runtime?

All the best,
Atanas Korchev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Aaron
Top achievements
Rank 1
answered on 17 Aug 2012, 03:42 PM
Hi, as I mentioned, the load balancer terminates the SSL connection so the connection to my web server is not secure. The IsSecureConnection property returns false.

I need a way to force an HTTPS CDN connection.

Thanks,

Aaron
0
Atanas Korchev
Telerik team
answered on 20 Aug 2012, 07:05 AM
Hello Aaron,

 This is not currently possible without modifying the source code. You basically need to find all places where IsSecureConnection is used and replace it with true.

Regards,
Atanas Korchev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Aaron
Top achievements
Rank 1
answered on 21 Aug 2012, 03:14 AM
How would I do that? IsSecureConnection is a read only property, there is no setter method. http://msdn.microsoft.com/en-us/library/system.web.httprequest.issecureconnection.aspx
0
Atanas Korchev
Telerik team
answered on 21 Aug 2012, 06:26 AM
Hi Aaron,

 You need to modify the source code of Telerik Extensions for ASP.NET MVC so it does not use the IsSecureConnection property.

All the best,
Atanas Korchev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Gary Davis
Top achievements
Rank 2
answered on 30 Oct 2012, 03:28 PM
I just had this issue too. We use an F5 load balancer to handle the SSL so when the websites get the request, it is no longer SSL. Our code can tell it was an SSL request by looking at an HTTP header set by the F5.

It would be nice to use this flag to tell the Telerik Script/StyleSheet Regestrars to use the SSL domains. We are using MVC extensions.

For a workaround for now (not requiring rebuilding the source), on the page that uses SSL, I used HttpWatch to see which scripts and css files were being pulled in with http instead of https and created a telerik.js and telerik.css file containing the contents of the files combined. I then added this to the script/stylesheet manager statements (.css shown, similar for .js):

.DefaultGroup(group => group
   .ContentDeliveryNetworkUrl("~/content/css/telerik.css")

This is not optimal but will work for now. One other thing, there is a sprite.png that also needs to be in the local project with edits to the .css to reference the png.

What I would like is to have a new property to allow setting and passing the flag like .DefaultGroup().IsSecureConnection(variable). Of course this would be adding the option to the source code and updates to all references that use the current IsSecureConnection.

Thanks,
Gary Davis
Tags
General Discussions
Asked by
Aaron
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Aaron
Top achievements
Rank 1
Gary Davis
Top achievements
Rank 2
Share this question
or