So basically I have 2 projects, 1 my project and the 2nd a scheduledagent.
In the scheduledAgent I make a server call (my app gets deactivated) and I want to save the reply into isolatedstorage, after which my app gets reactived.
So after my app gets reactivated I want to load the value that I saved in the scheduledAgent, but the problem is it is null everytime. (I am calling the save method)
code for scheduledagent:
so inside the OnInvoke method:
IsolatedStorageSettings.ApplicationSettings.Remove("token");
IsolatedStorageSettings.ApplicationSettings.Add("token", grant_token);
IsolatedStorageSettings.ApplicationSettings.Save();
(App gets reactivated)
code which continues to read the saved info:
IsolatedStorageSettings.ApplicationSettings.TryGetValue("token", out reply);
The problem is that "reply" is always empty, and grant_token does contain a value when saving
any feedback will help
thanx! B
IsolatedStorageSettings.ApplicationSettings, and kept in memory. So even if you callSaveyou won't have the new values, as they won't be read again. As a workaround, I suggest you manually save/read the values from the isolated storage, rather than usingIsolatedStorageSettings.ApplicationSettings- Kevin Gosse