Topics: Troubleshooting
Nov 11, 2010 at 1:30 AM

Hello all,

Yesterday I was working in my Composite C1 Console with no problems. I edited my Layout and Content pages, no problem.

Today when I load it all up, I get the following error:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at Composite.Plugins.Data.DataProviders.XmlDataProvider.Foundation.XmlDataProviderDocumentCache.GetFileRecord(String filename, String elementName, Func`2 keyGetter)
   at Composite.Plugins.Data.DataProviders.XmlDataProvider.Foundation.XmlDataProviderDocumentCache.GetElements(String filename, String elementName, IXmlDataProviderHelper helper)
   at Composite.Plugins.Data.DataProviders.XmlDataProvider.XmlDataProvider.GetData[T]()
   at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.<GetData>b__4[T](IDataProvider provider)
   at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.SyncronizedCall[TProvider,TResult](String providerName, SyncronizedCallDelegate`2 func)
   at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.GetData[T](String providerName)
   at Composite.Data.DataFacadeImpl.GetData[T](Boolean useCaching, IEnumerable`1 providerNames)
   at Composite.Data.DataFacade.GetData[T](Boolean useCaching, IEnumerable`1 providerNames)
   at Composite.C1Console.Events.ConsoleFacade.RegisterConsole(String username, String consoleId)
   at Composite.Core.WebClient.Services.ConsoleMessageService.ConsoleMessageServiceFacade.GetNewMessages(String consoleId, Int32 lastKnownChangeNumber)
   at ConsoleMessageQueueServices.GetMessages(String consoleId, Int32 lastKnownChangeNumber)
   --- End of inner exception stack trace ---

Any pointers here would be great!

Thanks so much! :)



Nov 11, 2010 at 7:04 AM


Cleaning of the 'Cache' folder should help.
To do a complete clean up of all generated elements,  you should:
    1) Stop the Application Pool or IIS process running the website
    2) Wait for the process to stop completely
    3) Delete content of the /App_Data/Composite/Cache folder
    4) Delete /bin/Composite.Generated.dll
    5) If site has "/App_Code" folder, rename this  folder to “/App_Code_disabled”
    6) Restart Application Pool / IIS process
    7) Using a web browser, request a website page. This may take several minutes. Wait until you get a response in the web.browser (either the website or perhaps an error about missing elements)
    8) Rename the folder “/App_Code_disabled” to “/App_Code”
    9) Using a web browser, request a website page. This may take a minutes. Wait until you get a response. Everything should work.
(the important step is that all cleaning is done while Composite C1 is not running)

Nov 11, 2010 at 7:15 AM

Hi Robert, I suggest you start by examining the file ~\App_Data\Composite\DataStores\Composite.Data.Types.IUserConsoleInformations_public.xml - check if it's a valid XML file. If it is not, is has been corrupted and you fix it by replacing the content with this:

<UserConsoleInformations />

and save, and you should be running fine.

Nov 12, 2010 at 3:45 PM

@Inna: Thank you for your reply.  However, I went with mawtex's suggestion as it was the simpler option. :)

@mawtex: That worked wonderfully, thanks! Interestingly, that xml file was empty of any content. All is good now.


Thanks again!

Nov 12, 2010 at 4:17 PM

@OCDDev: I guess "interesting" is a very kind synonym for "pretty scary" ;-) I think we can all agree that this is a bug that need to be fixed and I guess an explanation is required: We expect this problem can happen when running with the XML based data provider and the web app process is *killed* while XML is being written to disk. Such a situation can happen in situations like a stack overflow exception being thrown in another thread, the process is killed manually, the machine is powered off the hard way etc. Normal shut downs should not create this problem, but feel free to fill in so we may get wiser. The data type that got affected is updated whenever the servers gets "pinged" by the browser running the C1 Console.

We will look into making the Xml data provider more robust.

Nov 12, 2010 at 4:23 PM

Well, what happened, I figure, is this:

I never (or rarely) turn my machine off, however the morning that this issue presented itself my machine had, at some point during the night, crashed and turned itself off. I am not sure why it crashed and crashing rarely happens, thankfully.

I suspected the crash was probably the culprit for the issue, I just had no idea what to fix to make the errors stop. :)

Nov 12, 2010 at 5:43 PM

Hi Robert

Thanks for reporting the issue.  I think it can be (and will be) fixed by saving files in the way Visual Studio does it. Firstly, it saves the new version to a different file, than deletes the original file and renames the new file. Those file operationas are (probably :) ) safe for power-cuts. I don't remember how much time do they take to execute, but it should be something like 1-2 ms, so we can do it without a noticeable performance decrease.


// Dmitry

Nov 12, 2010 at 5:55 PM

Yeah, the current XML provider is pretty sensitive to unexpected shutdowns. I have my self destroyed several C1 installs because my vmwares crashed... it has only happend in development so far fortunately.

Feb 11, 2011 at 7:55 PM


Mar 8, 2011 at 5:35 PM

I just encountered this problem. My machine was low on power and it shut down last night. The file ~\App_Data\Composite\DataStores\Composite.Data.Types.IUserConsoleInformations_public.xml was empty. I added the <UserConsoleInformations /> element and it now works.

Napernik. Is it the latest nightly that it's fixed in? I'm using Composite C1 2.0 SP1 Build no. 2.0.3947.24461

Mar 8, 2011 at 5:49 PM

Reading through the checkin comments i'm not sure if this has been implemented. There is this feature request though that you should go and upvote. I think its about this issue as well

Mar 8, 2011 at 6:50 PM

This has been fixed in 2.1 - sorry about the check-in info being pretty vague , we will write up a thorough list of "What is new in 2.1".

@atomiton we can help you get on 2.1 with an upgrade package - we should be releasing this week. We are feature complete and have no more prio 1 bugs (last bug fixed today - YAY!) - we are now down to api comments and sanity checking the last bits).

Mar 8, 2011 at 7:26 PM

Yeah, found it in ( going through filechanges in every commit :)

Mar 8, 2011 at 8:07 PM

@burningice and the last piece of puzzle is that one

Mar 8, 2011 at 8:08 PM

Hey Mawtex. We're still in the early stages of Dev... so I can wait for the update. It's nice to have such a quick responsive community.