Skip to content
October 26, 2020 / kiranpatils

Sitecore Azure Real-world Learnings


I know you must be thinking, Isn’t it too late to post about this? as Sitecore released support for Docker and everyone is moving towards the container.

I also thought the same, As we’ve been doing Azure PaaS for the last ~3 years. I’ve been fortunate enough to work on various challenging situations for which there is no documentation available on the web.

I’ve been noticing that the Sitecore community is still learning Azure and people have a lot of questions about how Azure PaaS works. While I think the world will move to Docker in a couple of years. But till then existing deployed Azure PaaS solutions will need support as well as there will be few clients who will not be comfortable going with docker till they see Sitecore Community and Industry feedback.

This post should help you resolve your present Sitecore Azure PaaS challenges/questions.



If you are new to Azure PaaS, Then I would strongly recommend you go through the Azure 900 Fundamentals course. This course will give you basic knowledge of Azure offerings and this fundamental knowledge will surely help you. This post has explained it nicely:

For the context of this post, I will not go into the basics of Cloud, Azure PaaS, Sitecore on Azure as I understand the overall community has a good understanding of this. But if you prefer to explain it. Please let me know via comment on this post. And will share basics of Azure PaaS and Sitecore

I’ve divided our learnings in various categories:


There are various ways you can deploy Sitecore on Azure PaaS.

  1. Marketplace: You can Azure portal to setup environment using Azure Marketplace. This approach is fine for learning and exploring Azure PaaS or for short term needs. For long term and complex needs, we recommend using ARM templates
  2. ARM Templates: As per this approach, you will be able to provision your Azure PaaS environments using ARM Templates. Read more:–deploying-a-new-sitecore-environment-to-the-microsoft-azure-app-service.html One thing you have to remember is Sitecore’s ARM Templates: only provision Sitecore roles and not networking components. So, you might need some manual efforts around it.

Reference links:

Quick comparison of IaaS vs PaaS

IaaS WayPaaS Way
Remote desktop to Sitecore ServerAccess Azure Portal
Check logsCheck logs using
– KUDU/Application Editor
– Application Insights
– AzureTools.aspx
Check CPU/MemoryCheck CPU/Memory using KUDU Console
Check Event logsCheck Event logs using – Diagnose and Solve Problems
Generate Memory dumpGenerate dump
– Diagnose and Solve Problems
Restart App PoolRestart app from Portal
Add more hardware resources Upgrade Tier
Make a quick file change– KUDU
– Application Editor
Add new CD ServerScale

Other setup related learnings:

  1. Tiers: As per my experience. This is the place where it needs more planning and research due to the nature of the Azure world – Where things evolve over the night as well as your solution’s complexity and user load.
    1. – Sitecore team has done a good job documenting these and provide those in default ARM Templates. But use them as a base and try to update it as per your need and Azure world updates.
    2. – Standard Tier and Premium tier at the same rate with better hardware!
    3. reduction of 35%
  2. Elastic pool: OOTB ARM Template doesn’t come with Elastic Pool. But Elastic Pool is the most efficient way to manage your database usage!
  3. Plan your network layer: Before end-users start visiting your awesome site. You need to make sure your app is secure and load balancing is configured. It needs some work. Following are some good resources:

Once you are done with the above steps. Your site should be ready for the real-world!

But before you do that, Would recommend you go through the following section which talks about performance challenges we faced and it will be good to get those taken care of before you go-live or if you are already live and facing performance issues following section should help you.

Performance and Troubleshooting

  1. Sitecore logs: Where are your Sitecore log files? I’ve seen the majority of people struggling here. There are the following approaches using which you can access your Azure PaaS Sitecore log files:
    1. Application Insights is one way to query log data
    2. – You can also use AzureTools.aspx which is a Client page which queries application insights data [Read more:]
    3. App_Data/logs folder should be able to give you the latest log file. I’ve been using those for my Sitecore 9.3 version. I guess it was not enabled in 9.0.2. Tried to find official information. But was unable to locate it. You can read more about this approach from here:
    4. FTP – Personally – I haven’t used this approach. But you can give it a try if you like it!
    5. Good read :
  2. Advanced tools: If the log file is not giving you all information then you might need to use your advanced tools from your armory! Let’s see how you can use those in Sitecore Azure PaaS world:
    1. KUDU is your friend!
    2. Memory/Crash Dump has been my biggest friend for live issue troubleshooting. You can generate a dump using this approach: – Some screenshots are old. But you should be able to figure it out. The initial steps are same.
    3. Application map: If you want to see dependency information getting logged then you should enable application map: – This should be able to help you pinpoint the root cause of an issue.
  3. REDIS timeout: REDIS is critical from a performance point of view. I’ve already shared my learnings on this here:
  4. FCN Mode: If your application is crashing and the domain is getting recycled frequently (You can find such information from event logs) then you might be impacted by the FCN issue. Read more about FCN mode here: In Sitecore Media files are stored as a blob in DB and upon the first request, Sitecore creates your media output on the fly and stores it in MediaCache which is filesystem based and if FCN mode is enabled then it will recycle app pool as ASP.NET thinks there are a lot of file system changes happening and app pool should be recycled. It will be good to disable fcnMode in Web.Config. (httpRuntime fcnMode=’Disabled‘). But once you make this change then if you make any quick change in .cshtml or .aspx it won’t be reflected till the next app pool recycle. So, please read more about this before disabling it.
  5. Most important
    1. Stick to basics!
    2. Everything is still Sitecore — So, please apply your older learnings as well e.g. Checking stats.aspx, Event queue etc.

Hope this helps!

Good reads:

October 4, 2020 / kiranpatils

Comparison between Sitecore Custom and SXA Approaches


Sitecore supports Various development approaches:

Image Credits and blog reference

If you have been using the Sitecore Custom Development approach for a long time and haven’t heard about SXA yet. I would strongly recommend you to read more about it. You might like my earlier post: Sitecore SXA Basics

Or you have already learned about SXA and currently trying to figure out:

  • How can you move from the Sitecore Custom approach to SXA approach?
  • What are various approaches to do something in SXA compared to the Sitecore Custom approach?

Then this post is for you.

When we started exploring SXA. We had similar questions in our mind.

For my mind mapping, I used to compare each SXA approach with the Sitecore Custom Development approach. So, my mind can visualize and understand it.

Sharing Knowledge Quotes. QuotesGram
Image Credits :

Thought to share my learnings with you!


I’ve listed down the following table, Which compares various approaches for specific requirements.

RequirementSitecore Custom approachSXA approach
Multi siteConfig Driven : Item Driven :
LayoutNeeds custom developmentOOTB :
Page DesignConfigured on Template’s standard value–structuring-pages.html#UUID-d7d17364-b635-606b-41df-eb2f39df385e_section-idm46212287364752_body
ComponentsNeeds custom developmentOOTB Various Components are already available :   And it also allows you to tailor it as per your needs or create your custom component   Customize OOTB Component’s views per site :   You can also clone rendering : Note: Has initial learning curve.
SearchNeeds custom developmentOOTB SXA Search Components and Services :
Custom Link ResolverConfig Driven : Item Driven :
WorkflowNeed to assign at Template LevelSXA 10.0 :   Earlier version (Rule based and custom development) :
SecurityNeeds custom development and configuration
Site CloningNeeds custom developmentOOTB :
Front end – Back end integrationFED and BED works in isolated mannerCreative Exchange Live :   SXA 9.3 :   Note: Has initial learning curve.
ThemeNeeds custom development and mostly coming from file systemOOTB :
Sitemap/Robots.txtNeeds custom development or Marketplace moduleOOTB :
Error PageNeeds custom development or Marketplace module
Page output as JSONNeeds custom developmentOOTB :
CachingNeeds to do it at each component or item levelItem Driven OOTB Configurations :

You can also locate this table from following sources:

Google Doc can be located from here

Have I missed any requirements? You would like to contribute your learning to this document? Please let me know, I will give you edit rights to update Google doc.

Hope this document helps you reduce your SXA learning curve.

Happy SXA Development! 🙂

October 4, 2020 / kiranpatils

SXA Pipelines Cheatsheet


Pipelines have been core of Sitecore’s basic architecture. As SXA has been built on Sitecore architecture it is also following those footsteps.

We’ve recently solved a few interesting use cases using SXA Pipelines. The SXA Pipelines document ( has lot of great information. But it’s hard to locate this page as well as visualize all these pipelines (At least for me).

I was thinking to create something visual which gives you an overview of SXA Pipelines. And that’s how this post came into existence.



The SXA Pipeline (9.3)

Hope this helps you visualize all SXA Pipelines. Thanks to the Sitecore team for this:

Happy Sitecore SXA Development! 🙂

July 9, 2020 / kiranpatils

Sending an email using SendGrid with Sitecore


We’ve been using SendGrid for sending emails for most of our Azure PaaS clients. In case you are not aware of SendGrid. The following information will help you understand more. Source:

SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. SendGrid manages all of the technical details, from scaling the infrastructure to ISP outreach and reputation monitoring to whitelist services and real-time analytics.

Recently we migrated one client from IaaS to PaaS and faced an interesting challenge where Sitecore’s OOTB Workflow was trying to send an email and it was failing due to SMTP configurations.

We wanted to get this fixed without overriding Sitecore code and have minimal impact on this change. You are also looking forward to doing the same? Then this post might help you!


As you do, We also did a quick google search and came across this blog:

We tried those configurations. But no luck 😦

As per this document: there are a couple of options to use SendGrid:

  1. Using SendGrid’s C# Library
  2. Using .NET’s Built-in SMTP Library

We wanted to avoid the options #1 route as it would cause overriding a few Sitecore’s OOTB methods.

We also created a Sitecore patch file that overrides default MailServer configuration and uses SendGrid specific details. (You need to provide exact values for following variables)

<?xml version="1.0"?>
<configuration xmlns:role="" xmlns:set="">
			<setting name="MailServer" set:value="#{SendGrid.SMTP.server}" />
			<setting name="MailServerUserName" set:value="#{SendGrid.SMTP.username}" />
			<setting name="MailServerPassword" set:value="#{SendGrid.SMTP.password}"/>
			<setting name="MailServerPort" set:value="#{SendGrid.SMTP.port}" />

Just a note: If you would like to enable SSL. Then you can configure that using following setting. <setting name=”MailServerUseSsl” value=”true”/> Which I believe is new in Sitecore 9.3 (Default value is false)

But that didn’t fix our issue. After digging more we figured out that the above configurations are only applied when an email is being sent using Sitecore.MainUtil.SendMail() method.

Post refactor we figured out that method which was causing issue has been using System.Net.Mail.SmtpClient.Send(); method. Which doesn’t respect the above changes and relies mainly on the Web. Config configuration values. Based on the above learning, we made the following changes and that fixed our issue (You need to provide exact values for following variables):

< xdt:Transform="InsertIfMissing">
    <mailSettings xdt:Transform="InsertIfMissing">
      <smtp xdt:Transform="InsertIfMissing">
        <network host="__SendGrid.SMTP.server__" password="__SendGrid.SMTP.password__" userName="__SendGrid.SMTP.username__" port="__SendGrid.SMTP.port__" />

Long story short, If you want to use SendGrid then you have to make changes at couple of places:

  1. Patch MailServer setting values
  2. Update Web.Config for System.Net Node

I’ve also created gist for your ease :

<?xml version="1.0"?>
<configuration xmlns:role="" xmlns:set="">
<setting name="MailServer" set:value="#{SendGrid.SMTP.server}" />
<setting name="MailServerUserName" set:value="#{SendGrid.SMTP.username}" />
<setting name="MailServerPassword" set:value="#{SendGrid.SMTP.password}"/>
<setting name="MailServerPort" set:value="#{SendGrid.SMTP.port}" />
< xdt:Transform="InsertIfMissing">
<mailSettings xdt:Transform="InsertIfMissing">
<smtp xdt:Transform="InsertIfMissing">
<network host="__SendGrid.SMTP.server__" password="__SendGrid.SMTP.password__" userName="__SendGrid.SMTP.username__" port="__SendGrid.SMTP.port__" />

Let me know if this helped you or you learned something new while implementing this which others should be aware of.

July 9, 2020 / kiranpatils

7 learnings from Sitecore 9.3 upgrade


Recently we have done a couple of Sitecore 9.3 upgrades and while doing that learned a few things which would like to share with you with a goal that it might make your upgrade journey smoother!

For both projects, we installed and configured Plain Sitecore 9.3 and ported over code/configurations and Sitecore items from old instance to newly setup 9.3 instance.


#1 : Core DB error while accessing /sitecore/login on CD Server

As per Security best practice, /sitecore/login should not be accessible on CD Server. We got following error when we tried the same:

We reached out to Sitecore support and they gave us a link to KB article: as you might have noticed from KB article that this issue applies to 9.1+ version.

We tried KB article steps. But with no luck 😦

We had some back and forth with Sitecore and finally following steps worked for us, Which was approved by Sitecore support as well:

  1. Deployed modified patch file under App_Config\Include\z.Hotfix folder. (We had to keep shell site, which is required for EXM, as per error message)
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch=""
  <sitecore role:require="ContentDelivery">
      <site name="login">
        <patch:delete />
      <site name="modules_shell">
        <patch:delete />

2. Added following node in CD’s Web.Config. (You can also add web.config transform for automatic deployment)

<location path="sitecore">
      <deny users="*"/>

#2 : Identified Content delivery users as editors

We’ve been using Federated Authentication (Azure AD B2C) for Content delivery users/visitors. As soon as 5+ users/visitors login from CD Server they were getting redirected to Users are getting redirected to : /sitecore/client/Applications/LicenseOptions/StartPage – Usually you hit this page on CM server. When the number of logged-in content author’s count has exceeded your allowed license limit

From log file, We came across following log entry

“7692 17:25:11 WARN The maximum number of simultaneously active (logged-in) editors exceeded. The User extranet\x9lg8FkakV cannot be logged in to the system. The maximum of editors allowed by license is 5.”

Came across this As per this post – “Sitecore support has registered this a bug with reference number 366550, and there is (on request) a hotfix available for 9.3.”

We reached out to Sitecore support and they shared SC Hotfix 402431-1.update package with us. Deploying this patch fixed our issue!

#3 : Final step Workflow will not be listed in Workbox

This will be a super rare issue. But this was due to the client’s earlier setup and internal process, Where If an item reaches the final state. Someone will go to Workbox and manually publish. We were having parallel discussions and suggested a better approach. The client team wanted to have this functionality as-is. which works in Sitecore 8.2.

We reached out to Sitecore support and they were not able to find out when and why this got changed. But Sitecore support was able to help us with CustomWorkboxForm.cs file. Let me know if you also have a similar issue and I’ll share the file with you. I still believe this should be handled using Auto publish configuration.

#4 : Redis driver timeout issues

This KB Article: indicates that the issue is fixed in CMS 9.2 Initial Release. Which is true from the code point of view. But you still need to tweak your REDIS configurations. I’ve already penned down my thoughts on this earlier :

#5 : CTRL + S shortcut does not work in Experience editor

We noticed that CTRL + S operation was not working in the experience editor. Sitecore support was able to reproduce this issue and registered it as Bug: 359703. There is a change in PageEditor.JS. If you don’t have any customization in your PageEditor.JS then you can follow the steps given below:

To resolve this issue, please uncomment the following from your “Website/sitecore/shell/Applications/Page Modes/PageEditor.js“: = function(postaction) {
  var command = "webedit:save";
  if (postaction) {
    command += "(postaction=" + postaction + ")";

  this.postRequest(command, null, false);


if (e.keyCode == 83 && e.ctrlKey) {

#6 : SQL Exception when login to Sitecore

During login we faced following SQL Exception :

Nested Exception

    Exception: System.Data.DataException
    Message: Error executing SQL command:  
		INSERT INTO [Properties] (   [Key], [Value] ) VALUES (   @name, @value )

    Nested Exception

    Exception: System.Data.SqlClient.SqlException
    Message: String or binary data would be truncated.
    The statement has been terminated.
    Source: .Net SqlClient Data Provider

We were able to fix this issue by following steps given in this post :

But as per this KB Article: This issue is fixed when we asked more about this to Sitecore support. Here’s what they shared

I checked deeper and found out that it was because the texts: “SC_TICKET_” and “CORE_SC_TICKET”.
The KB mentions about “SC_TICKET” which is actually fixed (you could clarify that there is only CORE_SC_TICKET now but not SC_TICKET).Internally, Product team targets to fix this bug 223702 in the version 9.4. I have already informed Product team about this.

It looks like this issue is still open and If you come across this error then you can follow steps given in earlier post by Thom Sip.

#7 : Indexing error : sitecore- prefix is used for two Solr indexes

Core name for sitecore_testing_index and sitecore_suggested_test_index have “sitecore-” prefix. But other cores are using sitecore_ prefix.

To keep it consistent. We’ve created the following patch file to update Core names for those two indexes.

<?xml version="1.0"?>
<configuration xmlns:patch="" xmlns:role="" xmlns:search="">
<sitecore role:require="Standalone or ContentManagement" search:require="Solr">
<!–Somehow following two indexes has prefix "sitecore-" in their name and our Solr cores are not made that way.
For naming consistency updating core names–>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
<param desc="core" patch:instead="param[@desc='core']">$(id)</param>
<index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
<param desc="core" patch:instead="param[@desc='core']">$(id)</param>

That’s it for now. As you can see we had a lot of learnings and it wasn’t done by me alone. Thanks to everyone who has been involved in these efforts!

If you have new learnings, It will be good to share it with the community. I’m looking forward to your learnings!

%d bloggers like this: