Silverlight IsolatedStorage is deleted when the application terminates?

From what I can find, it looks like IsolStorage should be persistent unless the user manually removes it. And the next thread also says:

Is Silverlight isolated storage considered persistent or a cache?

It seems to me that if I close my application and restart it (since I am debugging debugging mode - I’m not sure that this is different from others), the data that I saved earlier are gone.

For example, as pseudocode:

onClick = let storage = IsolatedStorageSettings.ApplicationSettings let x = storage.Item key storage.Add(key, "Some Value") 

on the first click event, "x" is null (or empty) as expected. Then, for the second time, x will have “Some Value” - it all works fine, as expected. However, when I stop debugging and restart the application, the first time "x" returns to zero or empty. Tried the same with SiteSettings.

So, it seems to me that Inventor is not persistent after all? Just comes with the application lifetime?

0
source share
1 answer

1- Use SiteSettings instead of ApplicationSettings

System.IO.IsolatedStorage.IsolatedStorageSettings.SiteSettings ("YourKey") = yourValue

2- You need to save the data after changing it.

System.IO.IsolatedStorage.IsolatedStorageSettings.SiteSettings.Save ()

+3
source

Source: https://habr.com/ru/post/1396796/


All Articles