Sitecore config patching overridden for Azure…!!!???

Hi Folks,

Recently, I been struck by an issue where my config patches were not reflecting in Test environment. Not to mention, it is working absolutely fine in my local as well as on CI(typical developer’s excuse).

After initial investigation found, it is patching all of the config changes from my custom config patch file but not the particular one where I was overriding the Sitecore’s OOTB logging functionality to log error and fatal to Azure Application Insight(know as AppInsight).

For our deploying artifacts to test environment(which is Azure PAAS), we are using another great tool by Sitecore called Sitecore Azure Module(currently known as Sitecore Azure Toolkit).This is the one which is compatible with Sitecore 8.1. With this in place, my whole focus is shifted to this tools functionality and internal processing.

After thorough investigation of this tool and it’s architecture, I found the root cause of the config not patching issue(or I say config patching overriding issue). The module’s configuration item of template type /sitecore/templates/Azure/Deployment/Azure Deployment has a field call Global WebConfig Patch which has title text as [Do not edit!] – Global Web Config Patch (These are the global web config patches that will always be applied to every deployment). This field holds all the configurations for Sitecore XP to work in Azure PAAS environment.

Sitecore Azure Module Deployment Configuration Item

While we trigger the command to Upgrade Files in Sitecore Azure Module Window, it start packaging all the required files and also configurations. As part of Sitecore configuration packaging, it gets the whole patched output of all config files and after that is applies the config changes mentioned in the Global WebConfig Patch field of the above mentioned template under your Environment/location/Farm/WebRole item of your module configuration. The whole config path is finally written in single Sitecore.config file.

Tip: Be cautious while changing this global setting of Sitecore Azure module. Don’t do it until and unless you are knowing what are you doing.

Happy Deployment…!!!! 🙂

Advertisements

Published by

Parag Daraji

Working with Sitecore more than 6 year from now and in total around 10+ years of experience working on Microsoft web technologies. Challenges are something which keeps me motivated and keep me moving. I am Sitecore Certified Professional Developer as well as Microsoft Certified Professional Developer. Feel free to contact me for your Sitecore or Web Development Queries.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s