By default, Sitecore 9 ships with the customErrors mode set to RemoteOnly. I’m not complaining.  But if you’re using SIF to configure a QA server, you may want to change that.   In a push to have infrastructure as code, the module below actually does this for you.  Here’s the modlue:

Nothing really fancy here.  Just open up the web.config file, navigate to the customErrors node and set the value.  Special note to line 8 above.  This enforces valid (case-sensitive!) values for the element.  Allowing other values is not a good thing.

You can invoke this module using a SIF config like the one below:

Nothing mystical about this either.  Just a couple of parameters, one for the mode, one for the folder the site is installed in.  Take that and run it with SIF:

You can grab a zip of these two files here.

Facebooktwittergoogle_plusredditlinkedinmail