Images, etc. not using CDN URL after CDN configuration

Chidozie Bright asked on February 2, 2017 22:44

After configuring Kentico to use an Azure CDN (Verizon), images are still not using the endpoint URL. After setting up the CDN in Azure we then added the different CDN keys to the web config:

<add key="CMSAzurePublicContainer" value="true" />
<add key="CMSAzureCDNEndpoint" value="https://xxxx.azureedge.net" />
<add key="CMSAzureCDNCacheMinutes" value="60" />

Is there something else we are missing here? We've tried this both locally and in staging (hosted externally).

Recent Answers


David te Kloese answered on February 2, 2017 23:08

Hi,

you might be able to find some pointers in this blog by Joel Dahlin:

dahlindevelopment.com/.../installing-kentico-cms-in-azure-part-2/

mainly check :

Configure the site to use Azure Blob Storage in the web.config

<add key="CMSExternalStorageName" value="azure" />
<add key="CMSAzureAccountName" value="..." />
<add key="CMSAzureSharedKey" value="<shared key>" />
<add key="CMSAzureCDNEndPoint" value="http://....net" />
<add key="CMSAzureBlobEndPoint" value="https://....blob.core.windows.net" />
<add key="CMSAzurePublicContainer" value="true" />

And don't forget to store your Media files on disk.

1 votesVote for this answer Mark as a Correct answer

Chidozie Bright answered on February 2, 2017 23:47 (last edited on February 2, 2017 23:56)

Our Media Library files are being stored in Azure Blob Storage. Per the Kentico documentation (Configuring Azure Storage), this configuration should be able to be used with a Azure CDN.

All of the other tags that you've mentioned are already in, except for the ExternalStorageName, which is defined in our custom CMSModuleLoader that pushes all media uploads to storage, and CMSAzureBlobEndPoint, because we are using the CMSAzureAccountName key - both again according to the documentation. Also adding the CMSExternalStorageName is meant to map my entire file system to the Blob which is not what we want to do.

All of my azure settings:

 <add key="CMSAzureAccountName" value="AzureAccountName" />
 <add key="CMSAzureSharedKey" value="SnHpD+A+Hwk8OpA/FlOo8KqKG3Q7Ll+0AFa/GeaTSUCNCsDPxNjD1OTxjEKUsy0d8RwoRSpNPmDUzsftM0VS0w==" />
 <add key="CMSAzurePublicContainer" value="true" />
 <add key="CMSAzureCDNEndpoint" value="https://xxxxx.azureedge.net" />
 <add key="CMSAzureCDNCacheMinutes" value="60" />

I'll try adding the CMSAzureBlobEndPoint explicitly to see if that helps.

1 votesVote for this answer Mark as a Correct answer

Chidozie Bright answered on February 8, 2017 19:28

This still isn't working for me. Any other recommendations on getting the CDN functionality to work?

0 votesVote for this answer Mark as a Correct answer

Chidozie Bright answered on February 17, 2017 23:27

Turns out it was working the entire time. I was expecting different functionality. I expected that the URLs would update on their own. They do not and updating them is a manual process. I would like to see this functionality improved, especially in light of the fact the the 'Best Practice' for using Kentico's staging feature with Azure Blob Storage specifies the use of separate Blob Storage containers for each environment (local, staging, production, etc.) and then states that you can use it with a CDN.

While you can clearly set up a CDN to use with the storage, ultimately this set up is not efficient. If you want to use a CDN you can no longer use the permanent URLs (again as recommended) because only the Direct Link URL (with the CDN address) is the valid CDN URL. The only real way to do this is to use a single Storage Blob and CDN for all of your instances, which the documentation specifically recommends against. I'm not sure however if when syncing Kentico if this will duplicate content in the Storage Blob - I have yet to test that.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.