This project is read-only.

Server Error in '/' Application

Topics: ASP.NET 2.0
Feb 25, 2010 at 3:12 PM
Edited Feb 25, 2010 at 4:36 PM

Hi Guys, 

I cannot currently access my blog site due to the error shown below.

Right now, I don't have much idea how to fix this problem.  Need your help.  Thanks...

(Btw, I'm now using the latest version of BE.NET.)


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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>


2) Add the following section to the configuration file of your application:

       <compilation debug="true"/>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. 

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() +3979720
   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 C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:254
   ExtensionManager.LoadExtensions() in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:187
   ExtensionManager.ExtensionEnabled(String extensionName) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Web\Extensions\ExtensionManager.cs:55
   BlogEngine.Core.Utils.LoadExtensions() in C:\Data\Development\BlogEngine.NET\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) +2723014
   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) +8890735
   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.3074; ASP.NET Version:2.0.50727.3074


Feb 26, 2010 at 1:27 PM

To quickly fix the problem (whatever it is), I re-uploaded the files to the server. My site is now up and running, 'though it would have been been better if I knew what went wrong. Hopefully, the problem won't recur.

Mar 2, 2011 at 7:57 PM

I hit the same error and was pointed to your post.  If anyone knows how this error happened (and what we can do to prevent it), please let us know!