Azure CDN Connector

  0 rating
10/28/2014 1:07:45 AM
4/17/2015 1:40:20 PM
Source: Github

About


A Content Delivery Network (CDN) works by providing alternative server nodes for users to download resources (usually static content like images and JavaScript). These nodes spread throughout the world, therefore being geographically closer to your users, ensuring a faster response and download time of content due to reduced latency.


Microsoft provide a CDN service on the cloud. This service needs to take the static resources from a local folder on the same website. This package adds to Sitecore the feature to clone all the files of the Media Library into this folder. This action is going to happen just when you publish those items from the Master database to Web database.


After this, some extra configurations are necessary on the Content Delivery servers to take them from the CDN servers.



Documentation

Documentation
  • Documentation > Installation steps
    Installation steps
    After the installation of this package perform the following actions:

    - Edit the configuration file of this package with the Azure CDN data (/App_Config/Include/SitecoreFromArg.CdnAzure.config)

    - Edit the Web.config of the CD servers to change the following parameters:
     * Media.AlwaysIncludeServerUrl = true
     * Media.MediaLinkPrefix = "~/"
     * Media.MediaLinkServerUrl = Azure CDN Url (e.g.:"http://aabbccdd.vo.msecnd.net")
     * Media.RequestExtension (remove attribute value="ashx")
    0
  • Documentation > Configurations
    Configurations
    The configuration file has the following parameters:

    Enabled: This parameter allow you to disable this component.
    <Enabled>yes</Enabled>

    SourceDomain: On this parameter you can change the default folder name that Azure assign by default.
    <SourceDomain>/cdn</SourceDomain>

    1
Back
Release notes
v1.0.0.0 - First version
Known issues:
The connector is not removing the files in the folder, when you remove/rename the items in the Media Library. Workaround: Try to remove them manually. If there is no way to identify which file is old, you can remove all the file and perform a republish action.
Read more Back
Code examples
  • Code examples > SitecoreFromArg.CdnAzure.config
    SitecoreFromArg.CdnAzure.config
    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
      <sitecore>
        <pipelines>
          <publishItem>
            <processor type="SitecoreFromArg.CdnAzure.CdnPublishing,SitecoreFromArg.CdnAzure"
                       patch:before="processor[@type='Sitecore.Publishing.Pipelines.PublishItem.RemoveUnknownChildren, Sitecore.Kernel']">
              <Enabled>yes</Enabled>
              <SourceDomain>/cdn</SourceDomain>
            </processor>
          </publishItem>
        </pipelines>
      </sitecore>
    </configuration>
    2
  • Code examples > Web.config
    Web.config
    <setting name="Media.AlwaysIncludeServerUrl" value="true" />
    <setting name="Media.MediaLinkPrefix" value="~/"/>
    <setting name="Media.MediaLinkServerUrl" value="http://aabbccdd.vo.msecnd.net"/>
    <setting name="Media.RequestExtension" />
    2

Solution screenshots(0)

Upload

Reviews (0)

Sort by: Date Most votes
  • Profile Avatar
    [fullName]

    Level: 0

    x0 x0 x0

    [date]

    [title]

    [text]

    Was this helpful?

    0

Comments (0)

Sort by: Date  Most votes

Leave a Comment

Comment must be field in
Post comment
loader

Write a review

Title can't be empty
Review can't be empty
Post review

Download

Title Description Download Action

Add File