473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Settings.Save -> Invalid high surrogate character.

Hello,

I have a .net 2.0 application using a 'Settings.settings' configuration file
to store application settings. The settings are modified at runtime and
stored when the user exits the application.

Occasionaly, this exception will occur when calling the
Settings.Default.Save() method:

Invalid high surrogate character (0xDE1C). A high surrogate character must
have a value from range (0xD800 - 0xDBFF).
StackTrace: at System.Xml.XmlTextEncoder.Write(String text) at
System.Xml.XmlTextWriter.WriteString(String text) at
System.Xml.XmlText.WriteTo(XmlWriter w) at
System.Xml.XmlElement.WriteContentTo(XmlWriter w) at
System.Xml.XmlNode.get_InnerXml() at System.Xml.XmlElement.get_InnerXml() at
System.Configuration.LocalFileSettingsProvider.Ser ializeToXmlElement(SettingsProperty
setting, SettingsPropertyValue value) at
System.Configuration.LocalFileSettingsProvider.Set PropertyValues(SettingsContext
context, SettingsPropertyValueCollection values) at
System.Configuration.SettingsBase.SaveCore() at
System.Configuration.SettingsBase.Save() at
System.Configuration.ApplicationSettingsBase.Save( ) at
MyApp.frmMain.frmMain_FormClosing(Object sender, FormClosingEventArgs e) in
C:\MyApp\frmMain.cs:line 159

What could be causing this? Could one of the datatypes that I am serializing
in my settings file produce invalid characters? These datatypes are:

string
bool
int
double
long
System.Windows.Forms.FormWindowState
System.Drawing.Rectangle
System.Drawing.Point

Any suggestions would be apprecitated.

Chris

Aug 15 '07 #1
0 2063

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
3
by: Jon Slaughter | last post by:
I wrote an app that needed to save settings such as colors, fonts, etc... after hours of trying to use ConfigurationManager and AppSettings along with a few other things I finally found that I...
4
by: Richard Lewis Haggard | last post by:
I have an application that can't use the registry to save various user options and application settings. My first thought was to simply use an application configuration file but this approach seems...
5
by: Andy | last post by:
I need to write a VB.NET WinForms app. For this purpose I need to keep some settings of the application, like many other Windows applications do. The most obvious solution is to store settings in...
0
by: Marc | last post by:
Hello, I have a problem with the settings (save and load) My.Settings in VB.NET2005. Actually, I have made a new application, then I have created a setting (with a default value) and then I...
7
by: lord.zoltar | last post by:
I have a problem which I think can be solved by creating new Settings on the fly, but I'mnot sure if it's possible, or if a better solution may exists. Here's the situation: I have a project with...
3
by: =?Utf-8?B?Um9iIEw=?= | last post by:
I am trying to use a custom type inside settings.settings. When I create my class, I am able to add it in as the type and the value ends up showing as XML data. If I change any of the values in...
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
I am trying to create dynamic settings in a .NET 2.0 C# application. I need to be able to store settings on the user, but I do not know how many settings are necessary at design time because the...
7
by: Just_a_fan | last post by:
I save some data to an array in my program. I can reopen the setting screen and see that the data is, in fact, in the array. I then do a lot of these: My.Settings.Brkr1 = BreakerAmps(1)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.