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.
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?)
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.
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.
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.
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.
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.
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
Spaces between nodes and/or invalid characters inside the xml files located in:
/Umbraco/Config/Lang
/Umbraco_Client/Config/Lang
Spaces and/or invalid characters in config files in:
/Config/
Solution
Delete all language xml files not being used. You can always add an xml file if a different language needs to be supported.
Open Text Wrangler ( MAC ) and open every xml file and config file to edit. For each file:
Select all text
Select menu item Text > Zap Gremlins
Select all options (Non-ASCII Characters, Control Characters, Null (ASCII 0) Characters)
Select Delete under, "Zapped Characters:" unless you want to mark the zapped characters, then select one of the other options accordingly
Press "Zapp"
Save and close after you zap
If this doesn't correct the problem, make sure the permissions are setup correctly on your server.
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:
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
Any Ideas????????
Do you have any special characters in the name of that user?
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.
the error doesnt happen on my local, it happens to any user, I haven't edited any xml file, it happens in all browsers.
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.
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.
Line 1 position 38 is a question mark. Why would that cause a problem?!?!?!
We are running IIS 6 with MySql
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!
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.
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
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.
No problem Eric, glad the problem is sorted. (Remember to mark one of the replies as the solution)
Cheers, Lee.
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.
Umbraco - Invalid character in the given encoding. Line 1, position 38
Key Words
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".
Possible Causes
Solution
is working on a reply...