Answered by:
Root Element is missing

Question
-
User-1920063544 posted
After deploy my code in the live and am getting the following error
Server Error in '/' Application.
Root element is missing.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: Root element is missing.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[XmlException: Root element is missing.] System.Xml.XmlTextReaderImpl.Throw(Exception e) +76 System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) +61 System.Xml.XmlTextReaderImpl.ParseDocumentContent() +3981048 System.Xml.XmlTextReaderImpl.Read() +151 System.Xml.XmlTextReader.Read() +15 System.Xml.XmlReader.MoveToContent() +64 Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderManagedExtension.Read6_ManagedExtension() +19 [InvalidOperationException: There is an error in XML document (0, 0).] System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +613 System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) +102 ExtensionManager.DataStoreExtension(String name) in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:254 ExtensionManager.LoadExtensions() in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:210 ExtensionManager.ExtensionEnabled(String extensionName) in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:55 BlogEngine.Core.Utils.LoadExtensions() in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Utils.cs:543 ASP.global_asax.Application_Start(Object sender, EventArgs e) +5 [HttpException (0x80004005): There is an error in XML document (0, 0).] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +2721374 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +128 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295 System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231 [HttpException (0x80004005): There is an error in XML document (0, 0).] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8901019 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
Version Information: Microsoft .NET Framework Version:2.0.50727.4959; ASP.NET Version:2.0.50727.4955
Tuesday, August 16, 2011 7:14 AM
Answers
-
User3866881 posted
Root element is missing.
Please make sure that your xml contents should have a root.
e.g:
xml contents like this is OK
<Root>
<Value>Value1</Value>
</Root>
however, xml contents such as this will throw such error:
<Value>Value1</Value>
<Value>Value2</Value>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 18, 2011 12:31 AM
All replies
-
User500621135 posted
i got tyour error some where you specify the path with '/'
but there you have to be specify the path with '@"\..."'
pleaes take a look at on the the path you specify
Tuesday, August 16, 2011 7:42 AM -
User3866881 posted
Root element is missing.
Please make sure that your xml contents should have a root.
e.g:
xml contents like this is OK
<Root>
<Value>Value1</Value>
</Root>
however, xml contents such as this will throw such error:
<Value>Value1</Value>
<Value>Value2</Value>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 18, 2011 12:31 AM