Weird error to all my c1 project

Topics: Troubleshooting
Jul 5, 2011 at 7:33 PM

Hi guys,

Please help me, when I came in this morning all my c1 projects went all down, 6 projects all having the same problem, here's the error for all 6 projects:

Stack Trace:

[XmlException: Root element is missing.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +73
   System.Xml.XmlTextReaderImpl.ParseDocumentContent() +4076618
   System.Xml.XmlTextReaderImpl.Read() +145
   System.Xml.XmlTextReader.Read() +15
   System.Xml.XmlReader.MoveToContent() +70
   Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSubscribedTypesCache.Read4_SubscribedTypesCache() +19

[InvalidOperationException: There is an error in XML document (0, 0).]
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +630
   System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) +100
   Composite.Plugins.Application.ApplicationStartupHandlers.AttributeBasedApplicationStartupHandler.AttributeBasedApplicationStartupHandler.GetCachedAssemblyInfo() +148
   Composite.Plugins.Application.ApplicationStartupHandlers.AttributeBasedApplicationStartupHandler.AttributeBasedApplicationStartupHandler..ctor() +113

[TargetInvocationException: Exception has been thrown by the target of an invocation.]


Its really weird because nothing and no one changes anything on the server.


Arnel Gracela 

Jul 6, 2011 at 8:23 AM

Hi Arnel Gracela,

Can you restart the server and clear your browser cache? And see if the error occurs again?

Thank you


Jul 6, 2011 at 9:04 AM
Edited Jul 6, 2011 at 9:12 AM

Most likely the following  temporary file /App_Data/Composite/Cache/Temp/StartupHandlersCache.xml got corrupted. Deleting it, and restarting the site should help. The exception will be fixed in the next release.

Jul 14, 2011 at 6:21 PM

Hi napernik, your fix did the trick, it works now, thank you very much

Jul 14, 2011 at 6:30 PM

Hi again, sorry, that fix worked on one of our projects but it didn't work on the other one, i've already cleared the browser cache, even deleted temporary files, also done napernik's fix to delete startuphandlerscache.xml but to no avail.

Jul 14, 2011 at 6:39 PM

additionally I also still encountering this error below eventhough i've already set the folder security to everyone with full power.

Compilation returned error "Could not write to output file 'c:\inetpub\c1projects\project-web-10\App_Data\Composite\Cache\Assemblies\CMS_19BDC054_9080E395_v0002_ff3f441a-b855-4e56-977e-da5765cc6df1.dll' -- 'The process cannot access the file because it is being used by another process. '", File: "", Line: "0"

Jul 14, 2011 at 6:44 PM

and the fix to the error above i made is to keep restarting the site until the error goes away, is there a fix with this for the future release?




Jul 15, 2011 at 9:29 AM

I made a fix for StartupHandlersCache.xml, the reason for having "The process cannot access ..." is that IIS tries to start a new instant of website's working process before it stopped the previous instance. 

The work around would be the way you restart it: stop the app pool on IIS, wait until site is unloaded (10 - 15 seconds) and then start the app poll. It this case the shouldn't be any errors. We will try do to some fixes that would

make it not required, but for now it is.


// Dmitry