How to make IsolatedStorageSettings persist even after the device/emulator is turned off?

139 views Asked by At

I have read that data stored in Isolated Storage in wp8 is permanent.But I am a little confused about the term 'permanent'. I don't have wp8 device so I can't check this on a real device. I tried the emulator and everything is working fine until I close my emulator. I want to know if the same problem exists on the real device when the application is closed or the device is switched off.

My Code for saving email and password..

private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
try
{
   appSettings.Add("email", this.txt_email.Text);
   appSettings.Add("password", this.txt_password.Text);
   appSettings.Save();                        
}
catch (ArgumentException ex)
{
   MessageBox.Show("ERROR"+ex.Message);
}
return register;

Can anybody help me do this???

1

There are 1 answers

0
nkchandra On BEST ANSWER

Yes, what you read is correct. "The data stored in Isolated Storage in WP8 device is permanent". And the "Permanent" is as long as your app is in the device. And the data will be deleted, only if the app is uninstalled from the device by the user. Data persists even if the app is closed or even if the phone is rebooted.

Its different with Emulator. Once the emulator is closed, all the data is lost.