Recovering From Deleted Application Storage RRS feed

  • Question

  • I use IsolatedStorage to cache files on the client.  If the user deletes the storage through the silverlight right click silverlight menu (to clear the cached data) my application crashes. 

    This is because the store has been invalidated.  Now if I call GetUserStoreForApplication again I always get a "Initialization Exception"  Looking in Reflector it appears to be because of a file called "pendingcleanup.dat"  which is only cleared next time you load the application.

    Is there any way to re-initialize isolated storage without reloading the app?  I guess I could display a message box and then kick the user out, but that seems kind of nasty.



    Sunday, April 18, 2010 7:25 PM


  • Hi,

    When you're using IsolatedStorageFile, please try to put them in a using clause:

    using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
    Monday, April 19, 2010 9:51 PM