Return to doc.sitecore.com

Valid for Sitecore 6.x
How to auto-include configuration files?

Q:

How to auto-include configuration files?

A:

Auto-including configuration files.

New feature in Configuration.Factory allows to put an xml configuration file into /App_Config/Include and have it applied as a patch to Web.config at runtime. See the sample file content below:

<configuration >
  <sitecore>
    <connections>
      <first x:before="web">Hello, World!</first>
      <second x:after="master">Another Hello, world!</second>
      <test>Test</test>
    </connections>
    <settings>
      <setting name="WelcomeTitle">
        <x:attribute name="value">Sitecore Rocks!</x:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>

Implementation notes:

Tips and Tricks: