Copied to clipboard

Flag this post as spam?

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


  • Eric 27 posts 49 karma points
    Mar 15, 2010 @ 16:13
    Eric
    0

    Edit User Error

    I just installed a new instance of 4.0.3, And when I go to edit a user I get this error:

     

    Server Error in '/' Application.

    Invalid character in the given encoding. Line 1, position 38.

    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: Invalid character in the given encoding. Line 1, position 38.

    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: Invalid character in the given encoding. Line 1, position 38.]
       
    System.Xml.XmlTextReaderImpl.Throw(Exception e) +76
       
    System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +126
       
    System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res) +35
       
    System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount) +186
       
    System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount) +128
       
    System.Xml.XmlTextReaderImpl.ReadData() +368
       
    System.Xml.XmlTextReaderImpl.ParseDocumentContent() +74
       
    System.Xml.XmlTextReaderImpl.Read() +151
       
    System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +112
       
    System.Xml.XmlDocument.Load(XmlReader reader) +108
       
    System.Xml.XmlDocument.Load(String filename) +87
       umbraco
    .cms.presentation.user.EditUser.Page_Load(Object sender, EventArgs e) +667
       
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       
    System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco
    .BasePages.BasePage.OnLoad(EventArgs e) +15
       
    System.Web.UI.Control.LoadRecursive() +50
       
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627



    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

     

     

     


    Any Ideas????????

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 15, 2010 @ 18:19
    Lee Kelleher
    0

    Do you have any special characters in the name of that user?

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 15, 2010 @ 18:28
    Lee Kelleher
    0

    Hi Eric,

    Just looked at the stack trace again... it's most likely to be with the language XML files (in /umbraco/config/lang/) ... have you added or edited any of those files?  Take a look over them, see if there's anything strange in there?  i.e. Special characters around column 38? (double-check the XML in IE, that will throw an error if there is one?)

    Good luck, Lee.

  • Eric 27 posts 49 karma points
    Mar 15, 2010 @ 18:34
    Eric
    0

    the error doesnt happen on my local, it happens to any user, I haven't edited any xml file, it happens in all browsers.

     

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 15, 2010 @ 19:00
    Lee Kelleher
    0

    Hi Eric,

    Definitely sounds like there's an illegal (special) character in one of your language (XML) files.  Even if you think they haven't been modified, I'd recommend double-checking anyway.  This is a server-side error... so will happen regardless of the user/browser, etc.

    Good luck, Lee.

  • Eric 27 posts 49 karma points
    Mar 15, 2010 @ 19:18
    Eric
    0

    I think its a server setting, cause at my personal web hosting, it works fine, here at work, it does not.  Thanks for your help.

  • Eric 27 posts 49 karma points
    Mar 16, 2010 @ 15:13
    Eric
    0

    Line 1 position 38 is a question mark.  Why would that cause a problem?!?!?!  

     

    We are running IIS 6 with MySql

  • Eric 27 posts 49 karma points
    Mar 16, 2010 @ 15:48
    Eric
    0

    No matter what version if Umbraco I install it breaks at line 1, position 38.

    No matter what character is at position 38, it breaks.

    I do not want to use Sitefinity any more, PLEASE HELP!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 16, 2010 @ 16:23
    Lee Kelleher
    0

    Hi Eric,

    Which XML file is causing the problem?  What text-editor are you using to edit the file? It could be a character-encoding issue? (e.g. saving UTF-8 as ANSI?)

    Most of this is guess-work from me - you're not really giving us much to go on.

    Cheers, Lee.

  • Eric 27 posts 49 karma points
    Mar 16, 2010 @ 17:58
    Eric
    0

    Sorry Lee,

    Ive edited the xml files and config files using notepad, and using the UTF-8 encoding.  No matter what file I edit, the error stays the same.  It works fine on my local machine, and on the server I host my personal sites on, but here at work the Edit User page blows up.

     

    Thanks

  • Eric 27 posts 49 karma points
    Mar 16, 2010 @ 18:50
    Eric
    0

    Sorry for wasting your time Lee, the error wasn't on line 1, position 38 like it said, It was in the En.xml, in the users area.  I just removed all the spaces between nodes and It works fine now.

     

    Thank you for your help, and hopefully I can build the site in Umbraco and not sitefinity.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 16, 2010 @ 19:34
    Lee Kelleher
    0

    No problem Eric, glad the problem is sorted.  (Remember to mark one of the replies as the solution)

    Cheers, Lee.

  • Helen Proudlove 6 posts 28 karma points
    Nov 03, 2010 @ 12:53
    Helen Proudlove
    0

    I also had exactly this problem after copying files from one server to another. In the process of doing the copying it seems to have appended some junk at the end of each of the language xml files fro some reason.  To fix it I had to remove these characters from all of the language xml files not just the one that was in use.

  • Kyle 4 posts 24 karma points
    Oct 01, 2014 @ 00:43
    Kyle
    0

    Umbraco - Invalid character in the given encoding. Line 1, position 38

     

    Key Words

    Users Error, Invalid character in the given encoding. Line 1, position 38​

     

    Description

    When logged into Umbraco's BackOffice and a User is selected from the Users Node in the Section Bar, an error is shown in the Content Area with the title, "Invalid character in the given encoding. Line 1, position 38". 

     
     
    This error is very vague and very little documentation is found on the error.  
     
     

    Possible Causes

     
    1. Spaces between nodes and/or invalid characters inside the xml files located in: 
      1. /Umbraco/Config/Lang
      2. /Umbraco_Client/Config/Lang
    2. Spaces and/or invalid characters in config files in:
      1. /Config/
     

    Solution

     
    1. Delete all​ language xml files not being used.  You can always add an xml file if a different language needs to be supported.
    2. Open Text Wrangler ( MAC ) and open every xml file and config file to edit. For each file:
      1. ​Select all text
      2. Select menu item Text > Zap Gremlins
      3. Select all options (Non-ASCII Characters, Control Characters, Null (ASCII 0) Characters)
      4. Select Delete under, "Zapped Characters:" unless you want to mark the zapped characters, then select one of the other options accordingly
      5. Press "Zapp"
      6. Save and close after you zap
     
     
    If this doesn't correct the problem, make sure the permissions are setup correctly on your server.
     
     
     
     
     
     

     

     
Please Sign in or register to post replies

Write your reply to:

Draft