Hello Everyone
First time i want to store usersettings of my application
i created a setting like below
Name-Setting1,Type-string,Scope-user,Value-on
Now accessing it with the below code
string usersetting = Properties.Settings.Default.Setting1;
it threws the below error
Configuration system failed to initialize
Am new to handing settings!! any help?
Loading
narasimman gPosted Jan 12, 2011, 11:12 PM
Issue resolved!! now working
Since the project is confidential !! i have created a sample to show you!! but in sample it was working fine!! got confused!!!
In the Settings Page i Clicked Synchoronize (refer pick) !! after that, issue got resolved!! thanks for helping
FroglegPosted Jan 12, 2011, 11:11 AM
narasimman gPosted Jan 12, 2011, 4:26 AM
When am using the Code
Properties.Settings.Default.Setting1 ..It is throwing errror!!!
Configuration system failed to initialize
FroglegPosted Jan 12, 2011, 2:48 AM
If Properties.Settings.Default.Setting1 is a string value
if (string.IsNullOrEmpty(Properties.Settings.Default.Setting1))
{
string usersetting = ("default");
}
else
{
string usersetting = Properties.Settings.Default.Setting1;
}
This applies to all settings - also don't forget to save settings