Tricks to configure the backup of a Sitecore WebApp

In case you are running you Sitecore instance in an Azure WebApp this is an essential trick to configure correctly the backup of your webApp for CD and CM server

As you probably are aware Sitecore FileSystem backup works pretty well but obviously if the folder to backup is too big, you may have some issue backing up and restoring your app.

Therefore my golden trick is to configure the backup filter for your web site excluding the following folders using _backup.filter in the root of your site, here the list of folders to exclude in most of the scenarios on CD & CM instances:

  • App_Data/MediaCache
  • App_Data/logs
  • App_Data\DeviceDetection
  • Temp

in case you want to explore further options for your backup of the webapp this documentation explain all the additional settings,

Coveo Hidden Errors behind SOLR errors

Sometime Coveo hidden behind SOLR errors… one issue that I have found is the following one:

Could not find add method: AddIndex when loading my sitecore instance

Everything points to an unexplained SOLR error but in reality I still had to configure Coveo and that’s why was throwing random errors….

The secret to fix this issue is to temporarily disable Coveo with the following appsettings in web.config   <add key=”coveo:define” value=”disabled”/>

once I disabled Coveo, Sitecore instance will load and I can proceed with Coveo Modules installation and configuration…

Sitecore 10 – core – exploring ModelBoundView

One of the big news within Sitecore 10 is the support for ASP.NET core Rendering SDK for dotnet core 3.1 (note that in November MS released .net 5 and hopefully Sitecore will update the support and starting kit for .net 5

Sitecore released a starter kit and I would suggest to check the following links to get you started with the environment configuration:–using-the-getting-started-template.html

Anyway I wanted to give a simple explanation and breakdown of the ModelBoundView component that is the equivalent of the classic MVC ViewRendering exploring all the elements required to get your first ModelBoundView working.

Typically you would use a ModelBoundview when you want to bind simple content to a frontend component without having any specific backend/data composition logic but you envision a straight mapping between Sitecore Items and a cshtml view…

Code elements required within the core solution:

@model ContentBlockModel
@* Important: Self-closing tags will not work when rendering text fields with the Sitecore tag helpers. *@
<h1 class="contentTitle" asp-for="Title"></h1>
<div class="contentDescription">
<sc-text asp-for="Text"></sc-text>

here you can see two example of syntax asp-for and sc-text in action

using Sitecore.LayoutService.Client.Response.Model.Fields;
namespace MyProject.Models
/// <summary>
/// An example of binding to component fields (usually a serialized datasource item).
/// </summary>
public class ContentBlockModel
public TextField Title { get; set; }
public RichTextField Text { get; set; }

important elements within the startup.cs

Sitecore elements

data Template

Rendering creation using Json Rendering Template

rendering datasource configuration:

Content Item

Assigning the rendering to the Item

rendering datasource configuration

Layout Service

in case you need to trouble shoot having a look at the layout service is always a good idea{xxxxxxxxxxxxxxxxxxxx}

if you were wondering how it looks like:

further reference to the Sitecore documentation and sample project:

Azure Best Practice – Backup your CD/CM WebApp

This is a very simple but very important tip that I would recommend almost in all Sitecore PAAS implementation that I have worked on…

Unfortunately Azure OOTB does not enable the backup of your Azure WebApp, that means that if you delete some files or break something within your deployments, there is not an easy way to get back in time and restore it the files that you have changed.

My recommendation is to enable the Backup functionality of CD & CM web apps so that you can always easily restore a copy back in time in case something goes wrong.

The Backup will cover the entire FileSytem of your webApp therefore all the original Sitecore solutions + all the config files + All the deployed assets

You can either backup on demand or backup on the schedule, the schedule option or take a backup before deployment is my recommendation

Azure Best Practice – Configure Application Initialization to reduce Cold Startup time

This tips is required in the case you have multiple instances of your web app and it will prevent Azure bringing into the load balancer the cold instances until the cold instances have been warmed up and ready to serve traffic effectively..

Application Initialization was introduced few years ago with IIS 8

but it is surprising to see that not all the website hosted on Azure use this useful feature…

<add initializationPage="/" />
<add initializationPage="/page1/" />
<add initializationPage="/Category/page2/" />
view raw AppInit hosted with ❤ by GitHub

Sitecore Symposium 2020 Recap

Sitecore Symposium was very different in 2020 being forced to be an entirely online session… I am sure that the entire Sitecore audience got a different feedback on this format, some people saved several hours of travel time, but most of the people probably missed the unique vibe that only a LIV Symposium create within the Sitecore community…

Anyway coming to the announcements here the big news for Sitecore community:

Sitecore AI Autopersonalization

This feature was expected and it is good to see in Sitecore roadmap, obviously I feel it is fair to leverage the expectations since it will take some time to develop a mature AI auto personalization and there are other tools that claim the same goal but there is still margin for improvement. here you can read Sitecore announcement:

Sitecore as a Service

this was also expected, Sitecore aims to release content hub as a SAAS platform within the next 12-18 months. This is a further evolution of the current managed service offer and some customers will be certainly interested in this new delivery model

Next.js SDK for JSS to facilitate JAMStack and static site generation

This is a great news for all the developers who are considering building on the JAMStack using Sitecore facilitating Server Side Renedering and Static website generation without loosing all the benefits of Sitecore personalization

Sitecore 10.1 will be released early 2021 and has a brand new UI/UX in addition to Horizon

other new stuff coming in 2021

Azure Best Practice – Disable FCN for Sitecore Azure webApp

This trick is very important to avoid unexpected app pool recycling when deploying Sitecore on Azure Website especially on your CD

My understanding is that this issue could happen if you have not configured local storage. Note that local storage could bring some issues with media library and it is not recommended in all the scenarios.

However worth noting that once you disable the file system watcher you will need to do some manual restart of your webapp in case you change some configs / folder that otherwise would have forced a working role restart…

<httpRuntime fcnMode="Disabled" />
view raw web.config hosted with ❤ by GitHub

Sitecore 10 for developers

Sitecore 10 bring in loads of exciting new things for developers the more important in my opinion are:

  • core
  • Serialization CLI + VS Addon
  • Horizon UI
  • Containers

Due to my MS developer background, core is the more exciting news for me and confirm the maturity of Sitecore as an headless CMS

these two drawings explain high level core architecture

As you can see there is a clear decoupling in term of hosting from the custom code and the Sitecore instance that provide a set of services to a variety of web sites / apps etc..

When should you use core? I am leaving Sitecore to respond with one of their slides….

further info…


Sitecore CLI is the new serialization engine that is going to replace Unicorn and TDS, it comes with a CLI and a VS add-on I have tested it and I am looking forward to get it within my deployment pipeline…

further info:

Get To Know an MVP – Stelio Di Bello

Recently has been recorded a podcast where I talk with Tamas Varga about my Siteore journey, here you can find the link on CoreSampler website to listen the PodCast:

and here you can find a transcript of the conversation with Tamas:

Tamas:  Hi Stelio, please introduce yourself 

Stelio: My name is Stelio Di Bello, I am originally from south Italy and I moved to the UK thirteen years ago.

At the beginning of my career I have worked for Microsoft consulting services and I became a regional expert on Microsoft Commerce Server, the father of Sitecore Commerce…
Nowadays I work for my own company that’s an independent Sitecore consultancy, I work as technical architect and, I truly enjoy technology.
In my free time I am also an international Bridge player and I like to experiment with technology exploring conversational interfaces such as Amazon Alexa and face rekognition.
I work for big / enterprise clients within different industries and multimillion ecommerce websites. In my engagements, I do not work only with Sitecore but with with a variety of web technologies such as Akamai, Azure, AWS, FrontEnd development, Google Analytics, Tag Managers, Tracking & Optimisation products and everything else MarTech related…

Thanks to Sitecore, my work gravitates between IT & Marketing trying to deliver world class performing website in a very agile & flexible way of working to keep marketing department happy…
I have been awarded Sitecore MVP in the technology category for 6 years in a row.

Tamas: When did you join the Sitecore Community? 

Stelio: I have always been a big fan of Microsoft Content Management Server 2002 and I have actually, never felt in love with Sharepoint…
First time that I have heard about Sitecore was in 2009, when I was considering on a project to replace Sharepoint with Sitecore 6.2, in the end sadly we decided to keep Sharepoint… few years later following to that parenthesis I have done my first Sitecore 6.5 project and, after that  I have not been able to leave Sitecore world anymore… Within these years, I have been involved in several crazy and exciting projects… once a  Formula 1 client asked me to build a website from scratch in just three weeks from Wireframes to deployemnt, and I did it..  in the end, the website won a Sitecore experience award for marketing agility…
Within these years, I am always been a keen blogger and in my engagements, I do a lot of evangelism to other developers about Sitecore new versions / new functionalities and the best way to leverage the full Sitecore potential, such as personalization and testing capabilities.

Tamas: What do you find the most appealing in the Sitecore Community?

Stelio: When you are a developer and you are facing a problem and go on line searching for a solution and you find the exact answers to your problem on Stack exchange or on a blog post that is the moment that you realize that you have to give back…  share your experience so that other people can benefit from your learning and experience as you are learning from other people… I also quite enjoy attending Sitecore events in person, such as Sitecore user groups in London or SugCon Europe, meeting with other community members to share experiences and make friends keeps it fun and real

Tamas: What is your suggestion for someone would like to be an MVP? 

Stelio: I would recommend to everybody to follow their passion and share their experiences in any format that they find appropriate, it could be a blog, or a youtube video, a project on github or a module on marketplace…. every contribution is valuable to the community and everybody has to be able to express in the way that they feel more comfortable doing it…  the more important suggestion is to be passionate about technology and enjoy Sitecore…

Tamas: What is your favorite motivational quote?

Stelio: My favorite quote is:

simplicity is the ultimate sophistication” from Leonardo da vinci

I truly believe that often keeping it simple and effective is the key to success…

I often find situations where we are asked for perfect solutions that end up building unrequired complexity, often I see clients who wants to have way too many non production environments and end up spending loads of money on it…

don’t do it! keep it simple and effective and enjoy Sitecore!

Azure Best Practice – Compilation optimization for Sitecore Webapp on Azure

I have seen in few instances deployed on Azure PAAS an issue with recompilation leading to the app pool restart…

my recommendation for the <compilation> tag in the web.config is to add the following attribute numRecompilesBeforeAppRestart=”100″

this attribute will prevent restarting when it reaches 10 recompilations (note that 10 is the default value in case you do not specify it)

In case you have been investigating random restarts you should find in the Sitecore and Azure logs a message that explicit tell you that the application restarted since it reached the maximum number of recompilations

Note that if you are hosting your instance in Azure WebApp this is likely to be happening, since I have seen this issue in several instances…

<compilation defaultLanguage="c#" debug="false" targetFramework="4.6.2" numRecompilesBeforeAppRestart="100"/>

view raw


hosted with ❤ by GitHub