0
votes

I want to have all my static files (css,js,images) on Azure CDN, I followed this tutorial:

https://azure.microsoft.com/en-us/documentation/articles/cdn-serve-content-from-cdn-in-your-web-application/

I had in my app the following lines pointing to files in azure storage blob container:

<link href="https://stact1.blob.core.windows.net/cdn/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://stact1.blob.core.windows.net/cdn/Content/animate.css" rel="stylesheet" type="text/css" />
<link href="https://stact1.blob.core.windows.net/cdn/Content/style.css" rel="stylesheet" type="text/css" />

and my website renders perfectly fine http://screencast.com/t/6m9M2s4d

However according to the tutorial I should change the url to use the CDN. So I changed above to:

<link href="https://az780954.vo.msecnd.net/cdn/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="https://az780954.vo.msecnd.net/cdn/Content/animate.css" rel="stylesheet" type="text/css" />
    <link href="https://az780954.vo.msecnd.net/cdn/Content/style.css" rel="stylesheet" type="text/css" />

then everything is screwed up: http://screencast.com/t/NEM3sDQb

If I remove the https, I see no connections done on the network tab on developer tools, If I put https, I see 403 Errors.

The problem is HTTPS is enabled on the CDN http://screencast.com/t/RGvtj9uzq1

1
This tutorial azure.microsoft.com/en-us/documentation/articles/… explains how you enable HTTPS for the CDN. Did you install a certificate? - Luc
No I didnt, however it worked now, it looks to me that when you enable https then there is some sort of replication amongst servers. I tried with a friend of mine and he could see 2 files I couldnt, and I could see one he couldnt, after 30 minutes all 3 files are now viewable via https. Only explanation I have replication issue or something like that - Luis Valencia
That is weird, the replication can take up to 60 minutes, but that are just the content being distributed are around the data centers. If that was the issue these files shouldn't be available on plain http... Maybe it is the https configuration that wasn't distributed yet... - Luc

1 Answers

5
votes

Given that your https links are all now working the issue you saw would have been just due to delay for the SSL configuration to propagate. All configuration changes for Azure CDN can take up to 60 minutes to propagate to all CDN POP's (i.e. CDN data centers). CDN configuration is the only item that has a delay associated with it. Content is automatically cached to individual POP's when clients makes a request for the content. If clients don't make any requests for your content no content is cached on the CDN POP's.