Where are IsolatedStorage files stored?

bmihura used Ask the Experts™
When I use the attached code, I can read the files back with other code, but I can't find these files on my hard drive anywhere. If I ever switch computers, I would want to move that information.

This link...


...is not right; those directories exist on my machine but my files are not in there.
using System.IO.IsolatedStorage;

IsolatedStorageFileStream oStream =
  new IsolatedStorageFileStream("testFile",
  FileMode.Create, isoStore);

StreamWriter writer = new StreamWriter(oStream);
writer.WriteLine("This is my first line in the isolated storage file.");
writer.WriteLine("This is second line.");

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015
On the two systems I tested, the file created was located as noted.

    Windows Server Enterprise (and Win 7 I believe)

    Windows Server 2003 (and XP I believe)
        %USERPROFILE%\Local Settings\Application Data\IsolatedStorage\54ycip0l.ihf\bfbgtuak.pvs\Url.zlin2221ufpmmuucbdx4qpeqiaaiboxl\Url.zlin2221ufpmmuucbdx4qpeqiaaiboxl\Files

All of the gibberish you see will not be the same on your system. I show it to give you an idea of how deep you have to go in the folder structure. You are not going to be able to merely copy the folder structure exactly, I don't think, because the folders created are named with some kind of hashing it seems, and this may vary from machine to machine.

Also, if it is not located in these folders, it *will* be located in either AppData or LocalSettings, depending on the system. You may just have to do some trial-and-error.  :)
Most Valuable Expert 2012
Top Expert 2008

That is where they are for me:

C:\Documents and Settings\nhor5j.ASG_NT_NORWEST1\Local Settings\Application Data\IsolatedStorage



My problem was that the file find function was not finding the files. That link I gave was indeed correct, there were just multiple occurrences of the "Application Data" directory.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial