The browser console was showing errors for woff font type. So, in the site's web.config I included this property and it was fixed.

  <mimeMap fileExtension=".woff" mimeType="application/font-woff"/>

But, I want to add this property via a patch. I created a config in the VS project /App_Config/Include/MySite.config as below and published:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
        <mimeMap fileExtension=".woff" mimeType="application/font-woff" />

In the site's showconfig.aspx it is rendered as below, but the woff error in the console shows up.

<system.webServer patch:source="MySite.config">
  <mimeMap fileExtension=".woff" mimeType="application/font-woff"/>

Am I including the patch in the right way? Using Sitecore 8.0 with MVC


2 Answers 2


You can't patch configuration that are outside of Sitecore node section. To patch configuration outside Sitecore node I recommend you to use SlowCheetah.

Patching only works on the Sitecore configuration section. This is located in under /configuration/sitecore node section. Configuration in other sections of Web.config cannot be controlled through patching.

How to See the Result of Patching

Since the Sitecore configuration is the result of the merging of configuration from Web.config with a variable number of patch files, you cannot look at Web.config or any individual patch file in order to determine the configuration Sitecore is using. Sitecore includes an admin script to do this.

The script displays the results of the config file patching process.


You can find SlowCheetah on below link :


Getting started is really simple, just install this package. Then in the solution explorer you can easily add your config transform by right-clicking and selecting Add Transform.

enter image description here

After you add the transform you will notice a transform for each build configuration. enter image description here

You can place your customizations inside of the transform files, for example if you want to tweak app settings and connection strings you might use the syntax shown below.

When you build your applicatoin the files are transformed and dropped into the output directory. If you are transforming the app.config then when the file is transformed it will be renamed in the output directory as usual to ensure that your application picks it up at runtime.

For web projects the files are transformed when you publish or package your application.

You can also quickly preview your transform using the Preview Transform context menu on the transform file.

enter image description here enter image description here

  • 1
    Note that if upgrading Sitecore (as of 8.2.x) it will replace your web.config (creating backups). So you will need to go back in and drop in your web.config customizations, and/or update your local web.config copy with the updates. May 1, 2017 at 21:11

<system.webServer> is not under <sitecore> node in web.config file.

You cannot patch it using Sitecore mechanisms.

Here is pretty much the same question asked on StackOverflow site: https://stackoverflow.com/questions/30768383/trouble-with-sitecore-web-config-patch-file

And as Matthew Dresser explains there, to change config outside of <sitecore> node, you need to to this either directly or using transformation mechanisms (like SlowCheetah - check Vlad's answer for the link).

And more about Sitecore web.config include files and patching: http://intothecore.cassidy.dk/2009/05/working-with-webconfig-include-files-in.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.