none
CDN Fall back mechanism

    Question

  • Hi,

    I am using the CDN to store my JS CSS and Images in my project. I am accessing direclty from CDN. I want to know the CDN fall back mechanism which will help me in case of CDN failure, so that I can access images , JS, and CSS should access from local folders.?

    Thanks,
    Pavankumar Kulkarni

    Friday, June 5, 2015 2:36 PM

Answers

  • Can you provide more details on what is not working. Do you see a failure in getting the resource from the CDN endpoint? Does the request come back to the source origin? You should be able to see the requests in the IIS logs of the webrole instance.

    Regarding your question, you will need to add the scriptBundle for each of the jqueries you have like the example below shows(one each for "~/bundles/jquery","~/bundles/jqueryval etc).

    https://azure.microsoft.com/en-us/documentation/articles/cdn-cloud-service-with-cdn/#fallback-mechanism-for-cdn-urls

    bundles.Add(new ScriptBundle("~/bundles/jquery"<mark>, string.Format(cdnUrl, "bundles/jquery")</mark>).Include(
                   
    "~/Scripts/jquery-{version}.js"));

        bundles
    .Add(new ScriptBundle("~/bundles/jqueryval"<mark>, string.Format(cdnUrl, "bundles/jqueryval")</mark>).Include(
                   
    "~/Scripts/jquery.validate*"));

    Wednesday, June 10, 2015 3:40 PM

All replies