XmlException: Root element is missing.
Hi! Working in Visual studio, I have done "rebuiltAll" because my mouse moved too down in the menu despite I wanted to. Doing this I have lost my culture or something and I don't have a backup, so I upgraded my project. My problems were solved but when I tried to edit a page template (anyone, including defaults ones) It broke with an xmlException. I can't find the xml file that it's corrupt because web.config seems normal. This is the problem:
01.
[XmlException: Root element is missing.]
02.
System.Xml.XmlTextReaderImpl.Throw(Exception e) +94
03.
System.Xml.XmlTextReaderImpl.ParseDocumentContent() +1307
04.
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.ReadNextTag(XmlReader reader) +32
05.
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +79
06.
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +138
07.
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +81
08.
Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +194
09.
Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +30
10.
Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +272
11.
Telerik.Sitefinity.Modules.Pages.DraftProxyBase.CreateChildControls(Page page) +3921
12.
Telerik.Sitefinity.Modules.Pages.TemplateEditorRouteHandler.ApplyLayoutsAndControls(Page page, RequestContext requestContext) +378
13.
System.Web.UI.Control.LoadRecursive() +95
14.
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2760
Hello,
The error refers to the xml in Sitefinity configuration files. The configuration files are located in App_Data/Sitefinity/Configuration. When editing a page the configuration file used in ToolboxesConfig.config. Review the file and make sure it is populated with data, if the file is missing or its contents are missing, create a blank project and use its ToolboxesConfig.config file in the project you upgraded.
You will need to register your custom widgets again as their registration information is kept in this config file.
Kind regards,
Stanislav Velikov
the Telerik team
Ok, I have remade the project because I needed a solution quickly, but I have to say a thing, I read in other page that the configuration file is in App_Data/Sitefinity/Configuration but the truth is that inside App_Data there isn't a folder called "Sitefinity"
Hello,
When creating Sitefinity project with the project manager in App_Data you will find three folders Sitefinity. RadSpell and Storage. If you have no folders in App_Data make sure you see all files in visual studio by clicking "show all files button", here is a screenshot.
Kind regards,
Stanislav Velikov
the Telerik team
I had it in other folder, always in App_Data but inside other folder that maybe is the rest of an old project :/ but no problem, finally I have found where the files are (because I couldn't find other files I needed neither), because they aren't exactily where people/documentation say they are, maybe I have change something during instalation or something else.