Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adam Colbourne 20 posts 54 karma points
    Apr 27, 2014 @ 05:57
    Adam Colbourne
    0

    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.

    Currently running Umbraco 7.1.1. Everything was working fine, but suddenly I am now faced with this error on any page I go to (whether it's my active website or when attempting to access the backend control panel).

    Thoughts?

    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.


    [XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Xml.XmlTextReaderImpl.Throw(Exception e) +69
       System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) +78
       System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos) +46
       System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +5573330
       System.Xml.XmlTextReaderImpl.ParseDocumentContent() +347
       System.Xml.XmlTextReaderImpl.Read() +213
       System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) +44
       System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) +59
       Umbraco.Core.Services.SectionService.LoadXml(Action`1 callback, Boolean saveAfterCallback) +117
       Umbraco.Core.Services.SectionService.<GetSections>b__3() +86
       Umbraco.Core.Cache.<>c__DisplayClass8`1.<GetCacheItem>b__7() +10
       Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) +247
       Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem) +111
       Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem(ICacheProvider provider, String cacheKey, Func`1 getCacheItem) +115
       Umbraco.Core.Services.SectionService.GetSections() +89
       Umbraco.Core.Services.SectionService.GetByAlias(String appAlias) +49
       umbraco.BusinessLogic.<>c__DisplayClass5.<ApplicationStarted>b__1(ApplicationAttribute x) +36
       System.Linq.WhereEnumerableIterator`1.MoveNext() +139
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
       System.Linq.Enumerable.ToArray(IEnumerable`1 source) +77
       umbraco.BusinessLogic.ApplicationRegistrar.ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +184
       Umbraco.Core.ApplicationEventHandler.OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +37
       Umbraco.Core.CoreBootManager.<Complete>b__5(IApplicationEventHandler x) +19
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
       Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +94
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +38
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +158
       Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9
    
    [HttpException (0x80004005): '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9936761
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
    
    [HttpException (0x80004005): '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
  • Jan Skovgaard 11255 posts 23494 karma points MVP 7x admin c-trib
    Apr 27, 2014 @ 09:03
    Jan Skovgaard
    1

    Hi Adam

    Have you used some weird characters in your document type aliases or in a content node that might be the cause of this? It should not happen but sometimes it's hard to take all the weird characters into account.

    However you should try and and see if you can fix it by following this article from Simon Anthony http://www.simonantony.net/knowledge-base/articles/error-republishing-systemxmlxmlexception-hexadecimal-value-0x01-is-an-invalid-character/

    But before doing anything make sure to make a backup of the database and your files just to be safe.

    Hope this helps.

    /Jan

  • Jeavon Leopold 3005 posts 13193 karma points MVP 7x admin c-trib
    Apr 27, 2014 @ 22:43
    Jeavon Leopold
    0

    Hi Adam,

    One really useful thing to do would to be to copy umbraco.config from App_Date to your local machine, then rename it umbraco.xml and open it in Firefox, this will show us which property contains the hexadecimal character. If this doesn't show anything, then you will need to use the DB query as shown by Simon in his blog post.

    This was a nasty bug of the past often caused by copying and pasting from PDF content, perhaps there is one tiny way to still get in there, I hope the above will tell us more....

    Jeavon

  • Adam Colbourne 20 posts 54 karma points
    Apr 28, 2014 @ 05:45
    Adam Colbourne
    0

    Thanks!

    Jan, I had come across that article by SImon Anthony while trying to resolve this and unfortunately running the query he suggests doesn't help as apparently there is no error in the Log table.

    Jeavon, this is what I got when I did what you suggested:

  • Jeavon Leopold 3005 posts 13193 karma points MVP 7x admin c-trib
    Apr 28, 2014 @ 09:38
    Jeavon Leopold
    0

    Hi Adam,

    So Firefox is passing the xml as valid?

    If you don't have any sensitive content, could you post a zip of that xml file on Dropbox or simular?

    Jeavon

  • Adam Colbourne 20 posts 54 karma points
    Apr 29, 2014 @ 18:11
    Adam Colbourne
    0

    Hi Jeavon,

    Here's a link to the xml file: http://www.endlessvortex.com/umbraco.zip

  • Adam Colbourne 20 posts 54 karma points
    Apr 30, 2014 @ 18:10
    Adam Colbourne
    4

    I just wanted to say that I found the problem... somehow the applications.config file got corrupted (I have no idea how). When opened in a text editor I was met with the screen below.

    Not sure what caused it - but thanks all for the help! The suggestions gave me some direction as to how to track down the problem, even though it was a tedious process.

    - Adam

  • Jeavon Leopold 3005 posts 13193 karma points MVP 7x admin c-trib
    May 01, 2014 @ 12:49
    Jeavon Leopold
    0

    Hi Adam,

    Awesome you found that, certainly not one I've seen before!

    Jeavon

  • Marcel van Helmont 68 posts 258 karma points c-trib
    Jul 16, 2014 @ 11:36
    Marcel van Helmont
    2

    Same problem here running on azure websites.. In my log file i get the message:

    2014-07-15 20:39:30,690 [7] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 1] An unhandled exception occurred
    System.IO.IOException: An unexpected network error occurred.
    
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
       at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding)
       at System.Xml.XmlTextReaderImpl.FinishInitUriString()
       at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
       at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
       at ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper.Initialize(HttpContextBase http)
       at ClientDependency.Core.Config.ClientDependencySettings.LoadDefaultFileMapConfig(ClientDependencySection section, HttpContextBase http)
       at ClientDependency.Core.Config.ClientDependencySettings.LoadProviders(HttpContextBase http)
       at ClientDependency.Core.Config.ClientDependencySettings.get_Instance()
       at Umbraco.Web.WebBootManager.Initialize()
       at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
    

    I also has to replace the application.config en trees.config files to get it up and running again.

  • AvihayBit 141 posts 272 karma points
    Aug 11, 2014 @ 21:19
    AvihayBit
    0

    Hey I'm facing the same problem here. 7.0.2 everything was working fine, but suddenly I am now faced with this error on any page I go to (whether it's my active website or when attempting to access the backend control panel).

    My applications.config was empty too, but even when I swiched it with a backup one- I still got the same error. any Ideas?

     

    Any Idea?

    Server Error in '/' Application.


    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.

    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: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.

    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: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Xml.XmlTextReaderImpl.Throw(Exception e) +69
       System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) +78
       System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos) +46
       System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +5581130
       System.Xml.XmlTextReaderImpl.ParseDocumentContent() +193
       System.Xml.XmlTextReaderImpl.Read() +215
       System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) +44
       System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) +59
       Umbraco.Core.Services.ApplicationTreeService.LoadXml(Action`1 callback, Boolean saveAfterCallback) +117
       Umbraco.Core.Services.ApplicationTreeService.<GetAppTrees>b__0() +86
       Umbraco.Core.Cache.<>c__DisplayClass8`1.<GetCacheItem>b__7() +10
       Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) +247
       Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem) +111
       Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem(ICacheProvider provider, String cacheKey, Func`1 getCacheItem) +115
       Umbraco.Core.Services.ApplicationTreeService.GetAppTrees() +89
       Umbraco.Core.Services.ApplicationTreeService.GetByAlias(String treeAlias) +49
       Umbraco.Web.Trees.<>c__DisplayClassc.<ScanTrees>b__1(Tuple`2 x) +39
       System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +204
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
       System.Linq.Enumerable.ToArray(IEnumerable`1 source) +77
       Umbraco.Web.Trees.ApplicationTreeRegistrar.ScanTrees(ApplicationContext applicationContext) +295
       Umbraco.Web.Trees.ApplicationTreeRegistrar.ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +9
       Umbraco.Core.ApplicationEventHandler.OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +37
       Umbraco.Core.CoreBootManager.<Complete>b__5(IApplicationEventHandler x) +19
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
       Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +94
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +38
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +158
       Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9
    
    [HttpException (0x80004005): '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859725
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
    
    [HttpException (0x80004005): '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
    



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

  • AvihayBit 141 posts 272 karma points
    Aug 11, 2014 @ 21:23
    AvihayBit
    0

    Ahh!! just saw the last post with the trees.config file!! Now its working. Thanks Marcel van Helmont!!

  • Marcel van Helmont 68 posts 258 karma points c-trib
    Aug 11, 2014 @ 21:26
    Marcel van Helmont
    0

    AvihayBit are you running umbraco also on Azure?

    great that you also fixed it..

  • AvihayBit 141 posts 272 karma points
    Aug 11, 2014 @ 21:29
    AvihayBit
    0

    Nope. Private server. I have no idea what corrupted the files...

  • Marcel van Helmont 68 posts 258 karma points c-trib
    Aug 11, 2014 @ 21:41
    Marcel van Helmont
    0

    I have created a issue maby a core member knows the problem

    issue is here: http://issues.umbraco.org/issue/U4-5336

  • Emma Garland 34 posts 109 karma points MVP 3x c-trib
    Oct 25, 2014 @ 00:32
    Emma Garland
    0

    Same problem here, and looks like the same cause as Marcel van Helmont's post described (corrupted trees.config and applications.config).

    I started seeing:

    enter image description here

    I opened the config/applications.config and config/trees.config files in Sublime and it was just:

    0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

    etc... The logs show this info just before throwing the error:

    > 2014-10-24 15:29:23,614 [6] INFO  Umbraco.Core.PluginManager - [Thread
    > 1] Determining hash of code files on disk 2014-10-24 15:29:23,636 [6]
    > INFO  Umbraco.Core.PluginManager - [Thread 1] Hash determined (took
    > 12ms)
    

    I was having connection problems to the database just before this happened. The files had been changed and looked like it was since these connectivity issues began on the 18th October 10:22.

    I reverted those config files via Git and all was well again!

  • Brian Desmond 1 post 21 karma points
    Oct 25, 2014 @ 01:03
    Brian Desmond
    0

    This mysteriously happened to my site recently as well (10/16 specifically) which is hosted on Azure Websites. The applications.config file was nulled out as shown in the screenshot earlier in the thread. Both the applications.config file and the trees.config file are timestamped as having been updated today as I look. I'm unclear what is touching these files. I'm running 7.1.6.

  • Joseph 7 posts 56 karma points
    Nov 21, 2014 @ 18:55
    Joseph
    0

    Experiencing this issue as well, running 6.1.5 on an azure website. Was working fine one day, next day I'm getting frantic emails from my client... What is going on?

  • Jan Skovgaard 11255 posts 23494 karma points MVP 7x admin c-trib
    Nov 21, 2014 @ 19:06
    Jan Skovgaard
    0

    Hi Joseph

    It's probably caused by a weird character in the content somewhere, which makes it break.

    Have you tried following the advices mentioned on the first page of this thread?

    Make sure to read what Marcel writes about the application.config file and trees.config file on Azure.

    /Jan

  • Joseph 7 posts 56 karma points
    Nov 21, 2014 @ 19:45
    Joseph
    0

    Yes, just read through that, my application.config and tree.config files were corrupted. I replaced those and everything is up and running again, I'm just confused as to how it started in the first place.

  • Jan Skovgaard 11255 posts 23494 karma points MVP 7x admin c-trib
    Nov 21, 2014 @ 21:18
    Jan Skovgaard
    0

    Hi Joseph

    Ah ok, yeah I'm not sure what the cause is. I have not been using Azure myself yet.

    /Jan

  • Nicholas Westby 1938 posts 6524 karma points c-trib
    Nov 21, 2014 @ 22:34
    Nicholas Westby
    0

    I haven't read this whole thread, but FYI the issue with applications.config and trees.config being truncated is a known issue that has been fixed and will be released with Umbraco 7.1.9: http://issues.umbraco.org/issue/U4-5126

    I have encountered it in the past, actually, but had just chalked it up to gremlins. Looks like this has been a problem for years.

  • J 337 posts 581 karma points
    Oct 16, 2019 @ 09:04
    J
    0

    For me this occurred and was the applications.config file that became corrupted.

    Looking at the logs on the server it seems the file was in use/memory when the server crashed and caused it to become corrupt.

Please Sign in or register to post replies

Write your reply to:

Draft