Surendra Sharma

Surendra Sharma

Search This Blog

Friday, April 10, 2015

How to break or put Sitecore config file data into other config files

I am damn sure that you must sometimes face this problem during reading, finding or modifying any entry in Sitecore web.config file.

The config file that I have contains 3950 lines. WTF how to work with such a large file. Is there any way to break it?

Fortunetly YES. Here is the trick.

·         Cut all data lines after </appSettings> and before <log4net> from web.config i.e. cut "<sitecore " section only

  <sitecore database="SqlServer">

·         Create "sitecore.config" in "App_Config" folder and put all the data into it as
<?xml version="1.0" encoding="utf-8" ?>
 <sitecore database="SqlServer">


 At runtime Sitecore merge all these config files and treat them as a single file and work smartly.

Please leave your comments or share this trick if it’s useful for you.

1 comment:

  1. Remarkable blog! I have no words to praise, it has really allured me.
    UI company