Sunday, May 31, 2015

Error 500.19 Configuration File Too Long Sitecore Web.config

It is quite well known that the web.config file in Sitecore is monstrous.  It takes very little to make it large enough to get the 500.19 .NET error with the file being too large.  Most resolutions to this involve modifying the registry, but it does not really have to be that difficult.

The easiest solution is to take the Sitecore node out of the file and put it in a separate file similar to how the connection strings are pulled out.

The easiest way to get the whole node selected would be to use a text editor that supports regular expressions and use the expression (<sitecore)[\s\S]*(</sitecore>) to select it.  Then you simply cut it and past it into a file (I generally put it in a file called Sitecore.config in the App_Config folder).

After this you need to put an empty Sitecore node where you removed the old one from and add a configsource attribute that points to the new config file.

<sitecore configSource="App_Config/Sitecore.config" />

No comments:

Post a Comment