Vote count:
0
I have a windows 8.1 app that is using this code to load the previous state of the app:
ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings;
if (roamingSettings.Values.ContainsKey("userName"))
{
nameInput.Text = roamingSettings.Values["userName"].ToString();
}
The roamingSettings are stored here:
C:\Users\username\AppData\Local\Packages\87bfb6d3-2d15-43bb-8f52-7ee30bdd4c4e_c7a7mhx3d14pp\Settings\settings.dat
I ran regedit.exe as admin and opened the settings.dat file and changed the "userName" value, however when I ran the app again, I got this exception:
An exception of type 'System.Exception' occurred in HelloWorld.exe but was not handled in user code
WinRT information: Error trying to initialize the application data container server
Additional information: Loading the state store failed.
Why won't it let me change the userName directly from the settings.dat file?
asked 33 secs ago
ApplicationData.Current.RoamingSettings
Aucun commentaire:
Enregistrer un commentaire