root element missing RRS feed

  • Question

  • erver Error in '/rcamend2' 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) +72
       System.Xml.XmlTextReaderImpl.ParseDocumentContent() +5320383
       System.Xml.XmlTextReaderImpl.Read() +163
       System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +112
       System.Xml.XmlDocument.Load(XmlReader reader) +107
       System.Xml.XmlDocument.LoadXml(String xml) +160
       PUBLIC_NEW_RATION_CARD_Public_RC_Amendment.btnVerify_Click(Object sender, EventArgs e) +390
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782626
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0
    Saturday, June 15, 2019 12:22 PM

All replies

  • Hi bhavyashantha,

    1. Deciphering the error trace shows that the following line is trying to load XML from the string and failing to do so:
      System.Xml.XmlDocument.LoadXml(String xml) +160
    2. XML shall be well-formed with a root element. It cannot be just an XML fragment.
      Check it out: Well Formed XML
    3. You need to inspect your XML and make sure it is well-formed.
    4. Please see below a reproduction of your error.

    Sunday, June 16, 2019 7:14 AM