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:


Line 35:     {
Line 36:         DataSet tmpDs = new DataSet();
Line 37:         tmpDs.ReadXml(Server.MapPath("~/counter.xml"));
Line 38: 
Line 39:         int hits = Int32.Parse(tmpDs.Tables[0].Rows[0]["hits"].ToString());

Source File: c:\inetpub\vhosts\dharamkranti.com\httpdocs\Homemaster.master.cs    Line: 37

Stack Trace:


[XmlException: Root element is missing.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +89
   System.Xml.XmlTextReaderImpl.ParseDocumentContent() +6467966
   System.Xml.XmlReader.MoveToContent() +101
   System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving) +440
   System.Data.DataSet.ReadXml(String fileName) +91
   Homemaster.countMe() in c:\inetpub\vhosts\dharamkranti.com\httpdocs\Homemaster.master.cs:37
   Homemaster.counter() in c:\inetpub\vhosts\dharamkranti.com\httpdocs\Homemaster.master.cs:51
   Homemaster.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\dharamkranti.com\httpdocs\Homemaster.master.cs:23
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0