Sitecore Content Hub Expire Time Settings


Hi Champs,

Today we are going to check two important properties of Sitecore Content Hub which could help you to resolve the issue of getting logged out.

  • ExpireTimeSpan
  • SlidingExpiration

Basically, both properties are part of Authentication within Content Hub Portal Configurations.


This property is as same as session Timeout, but the catch is this works irrespective of activity as this works on authentication cookie.
You can increase the session timeout by setting “ExpireTimeSpan” to any value in minutes up to the upper limit of 1440 minutes, the default value is 30 minutes.


Set this property to true, then it works whenever a request is done before ExpireTimeSpan which updates the expiration time for the authentication cookie, the default value is false.

Both of these settings should be configured under Manage->Settings->PortalConfiguration->Authentication.

The default value of the setting “SlidingExpiration” is false,

I’ve linked some documentation describing these settings here.

Keep Learning Champs!!!!!

#sitecorecontenthub #sitecorelearn #sitecoremvp #Sitecore #SitecoreMVP #SitecoreCommunity #MVP #learnsitecore #contenthub #contentmarketing #sitecore #sitecorecommunity #developers #sitecoredevelopers #learnsitecore #contenthub


Performance tuning of Sitecore SPEAK components

Hi Champs,

Today I am going to explain you how you can reduce the time taken for loading by SPEAK components in your Sitecore application.

In order to reduce load time of SPEAK components after website modification, you can alter the compilation element in the web.config by adding the optimizeCompilations attribute to it as follows:

<compilation ...  optimizeCompilations="true">

Actual Implementation in web.config file looks like:


Adding this attribute will make ASP.NET re-compile only the files that were explicitly changed and leave all the other files intact.

Please note that if optimizeCompilations is true, you might encounter some issues during development after re-compilation. According to the MSDN article

When you change a top-level file only the affected files are recompiled. This saves time but can cause run-time errors depending on the type of changes you make to a top-level file.

Please check the Optimizing Dynamic Compilation part of the a aforementioned article for more details.

Happy Learning Sitecore !!!!

Check out your CD Solr indexing in Sitecore Azure PaaS Scaled Environment

Hi Champs,

Today I am going to talk on miss-configuration which sometime comes in CD role for Indexing strategy.

There was a scenario which recently I came across that from CD role in Azure PaaS Scaled environment Indexing was getting triggered which is wrong as indexing has to be triggered from CM role ideally. So below are the details of entire case study.

Cloud Environment: Sitecore Managed Cloud (XP-Small and XP-Medium)

Cause of the issue: By default indexing strategy was set to “onPublishEndAsyncSingleInstance” in CD role.

After investigating 10 days with Sitecore support and Product services team we found that indexing strategy was set to “onPublishEndAsyncSingleInstance” which was causing excessive DTU usage. This was set for below.

  1. sitecore_web_index
  2. sitecore_fxm_web_index
  3. sitecore_marketing_asset_index_web
  4. sitecore_marketingdefinitions_web

Solution: I created a patch file for setting indexing strategy to Manual for all above from CD role. As all these are getting rebuild properly from CM role.

Patch file: Patch file has below configurations. Note this has to be added only on CD role.

<configuration xmlns:patch="">
          <index id="sitecore_web_index">
                <patch:delete />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
          <index id="sitecore_fxm_web_index">
                <patch:delete />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
          <index id="sitecore_marketing_asset_index_web">
                <patch:delete />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
          <index id="sitecore_marketingdefinitions_web">
                <patch:delete />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />

Happy Indexing

MVC Pre-compiled views in Sitecore 9XP for Azure PaaS

Hi Champs,

Today I am going to explain quick learn for usage of Pre-complied view in Sitecore 9XP. Enabling Pre-compiled MVC views gives boost to performance in Azure PaaS environment, it is considered as one of the performance tuning parameter in  Sitecore Azure PaaS environment and Sitecore Managed Cloud.

By pre-compiling views you will benefit from the following:

  • Compile time checking of errors. Usually, Razor files are compiled when they are first required. By pre-compiling your Razor views you remove the source of runtime bugs.
  • Faster load time. The SitecoreRazorViewEngine will start to load your views from an assembly (.dll file) rather than a view (.cshtml file).
  • Once the Razor-Generator is Configured for your Visual Studio Solution you can follow below steps
  • To enable Razor-Generator Check this link.

Perform the following to pre-compile MVC views:

  1. Go to the below folder path. wwwroot\youewebsitefolder\App_Config\Sitecore\Mvc
  2. Here you will find the config file with the name Sitecore.Mvc.config”
  3. In this file search for term “<precompilation>”.
  4. And under <precompilation> node add below configuration highlighted in green. don’t forget to change the name to your assembly name.                                                                                                       <precompilation>
            <assemblyIdentity name=”Sitecore.Mvc” />
            <assemblyIdentity name=”YourAssemblyName” />

Happy Learning Sitecore !!!!

Disabling ARR’s Instance Affinity in Sitecore Azure Websites


Hi Champs,

Today I am going to help you in different aspect of scaled environment in Azure where I will explain what is ARR in scaled Sitecore Azure instances. So without delaying we will start this with below pointer which will explain all the things related to this.

What is ARR Affinity?

Application Request Routing (ARR) is a feature where when a client (or browser) request to any Azure based website, a cookie will be created and stick to the first time request received web site instance.

The same cookie will be used for subsequent requests from this client or browser and these requests will be guided to the same web site instance the one which was served for the first time.

With this feature, we can get an advantage if in case the web site instance is maintaining lots of data in it’s memory and moving the subsequent requests to other instance leads to copy entire data to other instance and this is a more performance and pain to the system.

We can see many disadvantages when compared with advantages. If a client request and unfortunately the sticky instance is not available, this request cannot be guided to any other available instance instead it will send an unavailable message to the client.

Also, In case if an instance is a too much load with other request and this request will be in request queue instead can guide to other instance to balance the load.

How ARR Affinity works?

  1. Client connects to an Azure Web Sites website
  2. ARR runs on the front-end Azure server and receives the request
  3. ARR decides to which of the available instances the request should go
  4. ARR forwards the request to the selected server, crafts and attaches an ARRAffinity cookie to the request
  5. The response comes back to the client, holding the ARRAffinity cookie.
  6. When the client receives the request, it stores the cookie for later use (browsers are designed to do this for cookies they receive from servers)
  7. When the client submits a subsequent request, it includes the cookie in it
  8. When ARR receives the request, it sees the cookie, and decodes it.
  9. The decoded cookie holds the name of the instance that was used earlier, and so ARR forwards the request to the same instance, rather than choosing one from the pool
  10. The same thing (steps 7-9) repeat upon every subsequent request for the same site, until the user closes the browser, at which point the cookie is cleared
This is how the affinity cookie looks:

Disabling the affinity can be done in different ways: (Every one prefer that last way explained)

  1. In your application
    To control this behavior in an application, you need to write code to send out a special HTTP header, which will tell the Application Request Router to remove the affinity cookie. This header is Arr-Disable-Session-Affinity, and if you set it to true, ARR will strip out the cookie. For example, you could add a line similar to this to your applications’ code: 
    headers.Add(“Arr-Disable-Session-Affinity”, “True”);
  2. In a site configuration
    If you prefer to have it completely disabled, you could have ARR remove the cookie always by having IIS itself inject that header directly. This is done with a customHeaders configuration section in web.config. Simply add the following into your web.config, and upload it to the root of the site: 


There is one more way yo disable this is which require us to follow below steps.
  1. Go to Azure App service.
  2.  Then go to Configuration.
  3. In configurations you will find General settings tab click on it.
  4. Here in this tab you will find the Sections called Platform settings.
  5. In this sections you will find the ARR affinity radio button.
  6. As per requirement you can disable it.(by default this is on)


To test this you need to go into HTTP header and check the value is coming or not. Another simple way is once you disabled it you can clear your browser cookies and load the website again and check in cookies sections and you will find that ARR cookie is not created.

Happy Learning!!!!

New/Existing Domain as Custom Domain in Sitecore Managed Cloud

Hi Champs,

As a part of Sitecore Managed Cloud series this one is last article about adding New or Existing domain to SMC app services.

So let’s start directly on article which tells us, how you can migrate the New/existing domain to your SMC Azure App Service as Custom domain.

Enable the CNAME record mapping in Azure

In the left navigation of the app page in the Azure portal, select Custom domains.

Custom domain menu

In the Custom domains page of the app, add the fully qualified custom DNS name ( to the list.

Select the + icon next to Add custom domain.

Add host name

Type the fully qualified domain name that you added a CNAME record for, such as

Select Validate.

The Add custom domain page is shown.

Make sure that Hostname record type is set to CNAME ( or any subdomain).

Select Add custom domain.

Add DNS name to the app

It might take some time for the new custom domain to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.

CNAME record added


After you added custom domain don’t forget to add this domain entry in to sites configurations in SiteDefinition.config or Sitecore.config files.

Happy Learning!!!!

Disaster Recovery in Sitecore Managed Cloud

Hi Champs,

Today I will explain DR or considering High Availability options in Sitecore Managed Cloud. So without doing any delay, we are going to touch straight to the point and start with a process for recovering your data in the event of an outage, incorporating:

  1. Backup technology
  2. Your secondary environment
  3. The steps of the recovery process
  4. Cost
  5. The recovery point objective (RPO)
  6. The recovery time objective (RTO)

Sitecore Managed Cloud offers three different disaster recovery options that differ slightly in cost and specifications, depending on your requirements. The recovery options available are:

  1. HADR Basic
  2. HADR Hot-warm
  3. HADR Hot-hot

Before we go into an explanation of the above three option, I want to explain basic terminologies in the Sitecore high availability disaster recovery (HADR):

  1. High availability (HA) – A system that aims to ensure an agreed level of operational performance. Usually, the uptime is higher than for the normal period, where the system can failover by itself.
  2. Disaster recovery (DR) – An area of business continuity planning that aims to protect an organization from the effects of significant negative events. Disaster recovery allows an organization to maintain or quickly resume mission-critical functions following a disaster that requires manual intervention.

Now I will explain all three options mentioned above, on a high level one by one as below.

HADR Basic:

With HADR basic, the Sitecore Managed Cloud disaster recovery service sets a process into action in the event of an outage. The steps of this process include:

  1. Scheduling a reoccurring backup, that occurs every 3 hours, of the following assets into the secondary database of the recovery point objective (RPO):
    • The databases.
    • Web applications.
    • The connection strings, (for the credentials).
    • The sizes/tiers of the resources.
  2. Arranging an outage page for customers to see while your site is down.
  3. Setting the traffic manager to switch between the primary Content Delivery (CD) server and the outage page.
  4. Setting up email alerts to notify the Managed Cloud Operations team if the availability tests fail.

HADR Hot-warm:

If you are using the HADR hot-warm option, in the event of an outage the Sitecore Managed Cloud disaster recovery service sets the following process into action:

  1. Deploy a new Sitecore environment in the secondary data center and shut down your web applications.
  2. Use active geo-replication to sync the data between the primary and secondary Azure SQL.
  3. Sync the sizes/tiers of all your Azure resources.
  4. Sync the file contents of all of your web applications.
  5. Set up an outage page to ensure your customers are aware that your site is temporarily down.
  6. Set up a traffic manager to switch between the primary Content Delivery (CD) server and the outage page.
  7. Set up email alerts to notify the Managed Cloud Operations team whenever an availability test fails.

HADR Hot-hot:

In the event of an outage, with the HADR hot-hot option, you must set into motion a recovery a process that is similar to the following:

  1. Enable recovery during a disaster by setting up the necessary environment before the disaster happens.
  2. Initiate the backup and replication process so that the Sitecore deployment and data are available for a healthy recovery.
  3. Deploy a passive Sitecore solution into the secondary region.
  4. Set up and enable the traffic manager to be the public gateway.


To set up your disaster recovery process:

  1. Ensure you are running your Sitecore solution (9.1 or later), on Azure.
  2. Install PowerShell with an Azure SDK, version 6.0.0 or later.
  3. Run your setup script and use the relevant modules.
  4. Use PowerShell (AzureRM), to log in to Azure and select the relevant subscription.
  5. Have your Sitecore license file ready.
  6. Have any scripts that you want to develop for your HADR hot-hot scenario ready.
  7. Use the Sitecore Azure Toolkit.


  1. Sitecore supports the following topologies: XM and XP, and the following deployment sizes: Extra Small, Small, Medium, Large, Extra Large.
  2. You can also use Simple Azure PaaS DR management to create DR of your SMC instances.


Happy Learning !!!!

Globalization Setting Sitecore PaaS and SMC

Hi Champs,

Today I am going to give you quick quick learning details about how you can setup default Culture of your Sitecore Application.

First question which will get raised why you want set  this?(specifically in Azure PaaS and Sitecore Managed Cloud)

Answer to this question is now a days we host Sitecore application in Azure PaaS or any Other Cloud offerings where the actual Timezone and Culture is different. In this case the impacts will come to few part off your application where your using default culture settings in application globalization. Which means miss match of time/date formats etc.

Next question will be How we can fix it ?

So the answer is as below.

  1. Go to your Sitecore application.
  2. Open Web.config.
  3. Serch for below term.                                                                                          “<globalization”
  4. You will find a predefined setting with few attributes but you can set few more attributes like below to set default Culture of your application.
<globalization requestEncoding="utf-8" responseEncoding="utf-8" enableClientBasedCulture="false" culture="en-GB" uiCulture="en-GB" />


  1. This setting is totally different than the Time Zone setting for Sitecore application.
  2. What I mean over here is even if you set Time Zone to the one which you want in Cloud still you will get issues with formats.
  3. So this settings will help all those issues in Sitecore.
  4. This settings is tested of in Azure PaaS and Sitecore Managed Cloud.

Happy Learning

Setting up the Razor Generator for Visual Studio Application

Hi Champs,

Today I am going to explain how we can setup the Razor Generator to you Sitecore Visual Studio Project for Pre-Compiled MVC views. Below are the steps to configure this.

  1. Open your MVC solution in Visual Studio.
  2. Install the Razor Generator tool.
  3. Open Properties of your view (.cshtml file).
  4. Set the Custom Tool field value to RazorGenerator and press Enter. In this case, a .cs file with the source code should be created for a view.rezor
  5. Build your project and copy the assembly with precompiled views into the \bin folder of your Sitecore XP solution.

Happy Learning

My Sitecore 2019 Contributions

Hi Champs,

I am writing this blog to share what I have done in year 2019, not only in Sitecore but in other tech communities also.

Year 2019 has been a very experimental year for me as at the start of the year I was working in Organization for Sitecore one of the huge/large scale Sitecore implementation. I was working as Sitecore SME/Architect there. As I was Client to Sitecore, I got a chance to speak with some great tech brain in Sitecore.

Suddenly one I got a call that you got selected and, I got a chance to move to Auckland thanks to my current Organization for this. After moving in New Zealand again I started to play with Sitecore and this time Sitecore with Azure PaaS.

Now coming back to what I have done so for Sitecore and other technologies.

Working with Sitecore:

I will take this as questions and try to answer.

How you are contributing to Sitecore from online platforms?

Answer to this question would be simple and that is– I have Modules in Sitecore Marketplace, I write a blogs, I have few Open projects in Git, I am active member of Sitecore StackExchange etc. So I will quickly give a summary via points to all this contributions as below.

  • Sitecore Market Place:

The main medium for sharing the new customized things for Sitecore is Sitecore Marketplace. I have below Modules Published in Market Place.

  1. Social Side Menu:
  2. Sitecore NFR:
  3. Sitecore IoT:
  4. Sitecore Fake SMTP: (Documentation for this module is in progress)
  • Blog:

The main medium for sharing knowledge is via blogs, I try to share my knowledge and different achievements over here in blogs so that those who are finding answers to those question they can get it easily.

  • Git:

I have repo where I have code for all the above modules and I also have few Open projects for Sitecore in Android which I am currently working on.

  • Sitecore StackExchange:

The other main medium for sharing knowledge is via Stackexchange, I try to share solution which is good fit for the questions which we get in the exchange I also try to follow best practice within Solution if it is related to code or configuration.


  • LinkedIn:

I have almost near to 2K connection here with different technology, I try to answer the questions which are asked here in LinkedIn for Sitecore also. But I mainly getting questions on chatbox here where I answer privately.  I also share knowledge at one of the groups created by Chris Williams for Sitecore DAM. I discussed how IoT helps to build the DAM in new era.

For this year, I’ve been working on different projects related to Sitecore. But each project complexity differs. So, with the different projects, I’ve been able to acquire experience but also to use new Sitecore features.

How you are contributing to Sitecore from offline platforms?

My offline activities haven’t changed. I keep on learning new ways, best practices on Sitecore. I am going to perform 1 presentation about the Sitecore Managed Cloud On-Boarding in SUG Auckland on 5th December 2019. I also help beginners in the team to learn Sitecore. As a part of CoE team I also help different teams to train then and setting up the environments for them according to their client’s needs. I am also involved in sales of products technically where I do tech pre-sales PoC for different Sitecore offerings. I also do freelance or volunteer consulting with different offline clients.

What is you experience with different new features of Sitecore?

I have little different experience with new Sitecore features like JSS, SXA,  new Sitecore Managed Cloud, Sitecore on Azure PaaS, as I said different then I will explain one example here is like JSS.

I worked on hacking JSS in Sitecore 8.2 version  and then we migrated the entire Site to Sitecore 9.2 for one of my client.

One more different experience is fine tuning website migrated from AWS IaaS to Sitecore Managed Cloud. But to explain few of my project related to these experiments I made point wise details as below.


This is the basic development whereby we had to get content architecture which will help to accommodate 1500+ SXA Multisites to the major global rollout.

Difficulty level: Extreme – Need to know how Sitecore works internally.


I created a dummy project in JSS just to get the idea of how it works internally. This was the reverse engineering which I have done actually to get one of my Sitecore 8.2 website upgraded to Sitecore 9.1.1 JSS website. In actual implementation we went with disconnected architecture to get everything resolved and now the Site is live. We used Native JSS as OOTB and React for the JSS app.

Sitecore Managed Cloud

This was one of the complex projects where I worked on migrating Sitecore site from AWS to Sitecore Managed Cloud offering. This is the first Sitecore Managed Cloud Project in New Zealand. The client is very happy with what we have achieved as the load time for Site is less than 2sec which is amazing. Working with the Managed Cloud team is great experience.

Other projects

I have also been involved in projects where we have used the Sitecore PaaS, work on presales for the client to get then on Sitecore 9.2 SXA with Sitecore Managed Cloud and Sitecore Commerce. Also working on different ongoing projects to get new features developed for them.

All the projects I’ve been involved in, I have tried to share my experience via blog posts or by performing presentations.

What are your future Objectives?

I will try to answer this in bullets as below.

  1. I will try to contribute more to all Sitecore community mediums.
  2. I am already in process of me next Sitecore Module.
  3. I am in panning phase of mobile based app for Sitecore which I will try to complete in coming year.
  4. Rather than just promoting Sitecore I am trying to sell new feature of Sitecore so that implementations of website will be more code less and Client will get full authority on what they want to do in Sitecore.
  5. Be a part of technical presales.
  6. I am trying to get Sitecore more into AI and IoT space for which I will be working throughout next year.
  7. I will be sharing the new learning and innovative things via my blogs to community.
  8. Keep learning Sitecore

Now this is a small contribution to Sitecore but I have few different things in my buckets as below.

Working with Azure DevOps/PaaS.

I finally managed to work with Azure this year as I was working only in premise VM’s, I badly wanted to work with Cloud and year 2019 given me this opportunity.

I learnt most of the  things like deploying .net web applications in Azure PaaS, creating and managing ARM template in Azure, Resource creation and managements, up scaling and down scaling in Azure, Performance tuning in Azure PaaS.

I also played around to create few Azure DevOps pipelines this years with total automation in workflow manner to push everything from source control system to running environments.

I decided to share what I got in Azure via my blogs and I already shared few and few are in pipelines to get published.

Working with Arduino

Yeh year 2019 asked me to go back and get this again in plate to eat. yes Arduino one of the best IoT platform to code and automate the things with IoT devices. In year 2014 I was playing around with Arduino on extensive level to get one of my university level project completed, but year 2019 asked me to play around with this to follow my passion about all these electronic/robotic kits. I started writing codes to Arduino AWS community IDE which is basically closed group for Arduino programmer where you can write code for Arduino and share within community and help them. I have 4 different sketch in Arduino right now and working on few more.

Happy Sharing,  Happy Learning