Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Isolated storage location for windows phone 7?

I'm building a windows phone 7 application using silverlight 4. I store my data in Isolated storage as outlined here. The program runs with no errors. My question is where I can see the file I have saved? Is it possible to find the file in the windows phone 7 emulator?

like image 783
StarCub Avatar asked May 14 '10 12:05

StarCub


People also ask

Where is the isolated storage folder?

Isolated storage generally uses one of three locations to read and write data: %LOCALAPPDATA%\IsolatedStorage\ : For example, C:\Users\<username>\AppData\Local\IsolatedStorage\ , for User scope. %APPDATA%\IsolatedStorage\ : For example, C:\Users\<username>\AppData\Roaming\IsolatedStorage\ , for User|Roaming scope.

Can I delete isolated storage?

You can delete directories and files within an isolated storage file. Within a store, file and directory names are operating-system dependent and are specified as relative to the root of the virtual file system. They are not case-sensitive on Windows operating systems.


3 Answers

The "Mango" SDK ships with the ISETool that can take and restore snapshots of an application's isolated storage to/from a local directory:

# Copy data from IS to directory
ISETool.exe ts xd <PRODUCT-ID> "C:\TempDirectory\IsolatedStore"

# Copy data from IS to directory
ISETool.exe rs xd <PRODUCT-ID> "C:\TempDirectory\IsolatedStore"
like image 198
Richard Szalay Avatar answered Nov 15 '22 11:11

Richard Szalay


After some more googling, i found this post. It seems that "the emulator does not save its state when you close it." Also:

Saving State. To test compatibility with other .Net framework environments I just re-implemented some standard Isolated Storage example code for application settings in my Silverlight application. It just works. But note, the preview emulator doesn’t hold state beyond debug sessions – so you can only test state storage in your application session at the moment.

from this post. (http://wotudo.net/blogs/wotudo/archive/2010/03/15/mix-building-a-windows-phone-7-series-silverlight-application.aspx)

like image 28
StarCub Avatar answered Nov 15 '22 10:11

StarCub


The intent of isolated storage is for it to be only accessible by the application that wrote the data in that store. Isolated storage can not be shared across applications, hence being able to find the files you store in isolated storage through an explorer like experience isn't allowed.

If you need to access the files to observe the data in it, or to share it across applications, consider storing the file in a cloud service. Or if you need to look at the contents of that file for debug purposes, maybe add an option to write that file on your server.

like image 42
ahmedel Avatar answered Nov 15 '22 11:11

ahmedel