CDN fallback

10 posts, 0 answers
  1. Michael
    Michael avatar
    52 posts
    Member since:
    Dec 2005

    Posted 07 Mar 2012 Link to this post

    If the telerik static CDN is not available, will it fallback to pulling the CSS from my server?  If not, is it feasible for you to add that feature?  Even though it is not likely that the Amazon CDN would not be available, you can never completely rely on cloud services, as seen from the recent Azure downtime.  I would appreciate your thoughts on this one.
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 12 Mar 2012 Link to this post

    Hi,

    In case the Amazon cloud service is not available for some reason, the styles or script won't be loaded. This is the standard behavior of the RadScriptManager/RadStyleSheetManager and currently we have no plans of changing it.

    Kind regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael
    Michael avatar
    52 posts
    Member since:
    Dec 2005

    Posted 12 Mar 2012 Link to this post

    If by "standard behavior", you mean that it doesn't have that feature, then I agree.  :)   No "cloud" service can ever be 100% reliable, but the combination of a cloud service and my own servers as a fallback would be ideal to me.  If there is no way you would add a feature like that, do you have any suggestions on how I could handle it myself?
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 15 Mar 2012 Link to this post

    Hello,

    You are right that relying only on a cloud service is not the most reliable solution and providing a back-up is a good approach. In general you could check whether the cloud service is available and if not you should alter the BaseUrl and BaseSecureUrl  properties of RadScriptManager's CDN settings to redirect the user to other CDN provider or simply disable it through the TelerikCdn property.


    Regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. SK
    SK avatar
    4 posts
    Member since:
    Aug 2012

    Posted 15 Aug 2012 Link to this post

    Hello,
     Would it be possible to provide a code sample of this approach?
    I.e. checking if the CDN is available, and if not changing the BaseURL/disabling CDN via the flags?

    Thanks,
     
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 17 Aug 2012 Link to this post

    Hi Sajit,

    I did a research regarding your questions and found the following helpful post. The overload parameter is the address of the located resources e.g. "http://aspnet-scripts.telerikstatic.com/ajaxz/2012.2.815/Common/jQuery.js"
    public bool IsAddressAvailable(string address)
    {
        try
        {
            System.Net.WebClient client = new WebClient();
            client.DownloadData(address);
            return true;
        }
        catch
        {
            return false;
        }
    }


    All the best,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. SK
    SK avatar
    4 posts
    Member since:
    Aug 2012

    Posted 17 Aug 2012 Link to this post

    Hi Peter,
     Thank you for the reply, but this would test connectivity from the server, wouldn't it?

    My use case is as follows: I have users who can connect to my website from their home office, as well as the work sites. When at work they have to configure a proxy to access the internet. In some cases, the switch over from their homes (where they use a VPN) to the work network does not go well, and the proxy is not configured correctly. 
    I also have users in other countries where connectivity may not be guaranteed or not available due to their work site policies.

    I would like to:
    1. Fail over transparently to the local copies of the JS files that I use   and/or
    2. Present a notification to the user saying that because internet connectivity is not available, the website may work slowly.

    With Javascript in the <head> tag, I could do something like
    <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
    <script type="text/javascript">typeof Sys === 'undefined'
    || document.write('<script src="~/scripts/MicrosoftAjax.js">\x3C/script>')</script>

    I want to find out how to do the same with the RadScriptManager and setting (the server side) CdnSettings-TelerikCdn flag.

    Thanks in advance,
  9. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 22 Aug 2012 Link to this post

    Hello Sajit,

    I am afraid that it is not possible to achieve the described scenario. In case that we find out a way to resolve similar cases we are going to add it in our documentation or resources.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  10. Martin de Ruiter
    Martin de Ruiter avatar
    99 posts
    Member since:
    Jun 2005

    Posted 30 Aug 2012 Link to this post

    I would like to see CDN fallback to local support added to RadScriptManager/RadStyleSheetManager as well. Can you perhaps create an entry in PITS?
  11. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 04 Sep 2012 Link to this post

    Hello,

    I just created a PITS item. Please give your votes here. Keep in mind that you need to wait a little until the item is loaded.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017