John
John

Reputation: 681

Background task and writing to isolated storage

I'm struggeling with writing to the isolated storage in my background task. The reason for this is that in every run of the background task I'm downloadng data and I need to compare this data the next time the background task runs. If the data has changed then a toast notification is shown.

Problem is that the data I'm writing to the isolated storage is not saved. I can use it in the rest of the OnInvoke function but the next time the background task runs the value is gone.

Am I missing something here, I thought this was going to be easy?

EDIT: Reading values works just fine and writing values from my main app also works just fine The code I'm using in my OnInvoke function is this:

IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
settings["WebValue"] = gtResult[i];

Upvotes: 4

Views: 1360

Answers (1)

Martin Risell Lilja
Martin Risell Lilja

Reputation: 652

Maybe settings.Save(); should do it?

Upvotes: 7

Related Questions