Sitecore Azure PaaS – With Email Campaign Manager (ECM)

Sitecore Azure – With Email Campaign Manager (ECM)

This article related to:


First of all the normal ECM Content Authoring / Content Delivery considerations apply. These are documented here:

To do this, change the CD XSLT transform on the deployment server. For example:

  1. Open Content Editor and locate the Production / Azure item. (ie Sitecore -> System -> Modules -> Azure -> .. -> South East Asia -> Delivery01 -> Role01 -> Production)
  2. Open field “Config Patches”  and this connection string to the existing ones:<add name="EmailCampaignClientService"connectionString="url=http://CMserverURL/sitecore%20modules/web/emailcampaign/ecmclientservice.asmx;timeout=60000"/>
  3. Locate the following to the “[do not edit] Global Web Config Patch” and add this
    <xsl:template match="/configuration/sitecore/settings">    
          <setting name="Analytics.DefaultDefinitionDatabase" value="web" />
         <xsl:copy-of select="."/>

    after this:

    <xsl:template match="/configuration">

Sitecore Azure Transform Issue

In Sitecore Azure 7.2 and lower, the XSLT transform for the CD web.config is slightly incorrect, ie this

<site name="modules_shell" value="web" .... />

should be this:

<site name="modules_shell" content="web" ..... />

And these configs are generated by the Azure module from deployment server. So to fix this  you will need to change the following:

  1. go to this item in content editor /sitecore/system/Modules/Azure/<name>/<region>/Delivery01/Role01/Deployment
  2. find “Deployment Type Web Config Patch” field
  3.  replace
<xsl:template match="sitecore/sites/site[@content='master']/@content">
    <xsl:attribute name="value">web</xsl:attribute>

with this:

<xsl:template match="sitecore/sites/site[@content='master']/@content">
   <xsl:attribute name="content">web</xsl:attribute>

This is essentially required because the ECM open url is located  here:

[cd server url]/sitecore%20modules/shell/EmailCampaign/RegisterEmailOpened.aspx

and this is not configured correctly by the Sitecore Azure Module

Speak Serlialisation

This has been resolved when using SPEAK 1.0.0 rev. 140131. But this applies to all earlier versions of SPEAK

Without modification Email Campaign Manager (ECM) does not work on the Sitecore Azure (Platform-As-A-Service) Editing environment without some customisation to the SPEAK assembly. And when an email is dispatched without customisation using ECM the following error is hit:

Type 'Sitecore.Web.UI.WebControls.Message' cannot be serialized. Consider marking it with the DataContractAttribute attribute...

This is because the ECM module uses  session state to store the messages and on Azure session state is stored in a custom serialized session state provider. And Sitecore officially only supports in-proc session (ie in memory). The problem with ECM is it relies on storing non serializable Sitecore SPEAK message objects in session…. hence it breaks when used in the Azure environment..

The work around:

  1. Open the assembly from the Bin directory called “Sitecore.Client.Extensions.dll” in Telerik Just Decompile (with cecil installed) or another decompiler tool. Locate the class Sitecore.Web.UI.WebControls.Message and make this serializable (this can be done by selecting the Attributes checkbox)sitecore-session-make-serializable
  2.  Now save the new assembly from within JustDecompilesitecore-session-make-serializable-save
  3. Replace the Sitecore.Client.Extensions.dll in the bin directory with that created in the previous step. (make a backup of the original Sitecore.Client.Extensions.dll.bk

The ECM data that is required to be stored in Session State can now be serialised and the ECM emails can work as normal. Done!

Final Note:

Sitecore Azure PaaS is a great cost and time saver, but not all modules are supported on this out of the box. But Email Campaigner Manager and Web Form For Marketers can be amended to work on Sitecore Azure relatively easily.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>