Umbraco ‘Sections must only appear once per config file’ Error

After installing Umbraco, it is likely you might see this error message when you try to load your website:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
Parser Error Message: Sections must only appear once per config file.  See the help topic <location> for exceptions.
Source Error: 
Line 21:       <add namespace="Umbraco.Web" /><add namespace="Umbraco.Core" /><add namespace="Umbraco.Core.Models" /><add namespace="Umbraco.Web.Mvc" /><add namespace="umbraco" /><add namespace="Examine" /><add namespace="Umbraco.Web.PublishedContentModels" /></namespaces>
Line 22:     </pages>
Line 23:   <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></system.web.webPages.razor>
Line 24: 
Line 25:   <appSettings>

When you look in your web.config, you’ll notice you can’t find the host entry.  Instead, have a look in the web.config in your Views folder. In here you should be able to find the MvcWebRazorHostFactory entry to remove it. One thing to note.. at the end of the line is a closing tag.  Do not delete this otherwise you will see a missing tag error instead!

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *