IsolatedStorage

M

Mythran

We are using the P&P Enterprise Library Application Blocks in our
applications and I'm reviewing how the EL stores it's cached data. As I was
looking through the implementation of the security cache, I came across a
class that was using the System.IO.IsolatedStorageFile class. I decided to
look it up to understand it more and the MSDN docs fall short of explaining
what it's used for. A quick glance at google came up with nothing I could
make use of in a short amount of time and would like to see if anyone here
can come up with a quick description of what the IsolatedStorage and
IsolatedStorageFile classes are and what they should/should not be used
for...?

Thanks,
Mythran
 
M

Markus

[...] and would like to see if anyone here can come up with a quick
description of what the IsolatedStorage and IsolatedStorageFile
classes are and what they should/should not be used for...?

Well, mainly to store information that are (1) user specific and (2)
application specific. You do not need to know any path information or
similar, everything is handled by the framework.

So what about alternatives:
- Storing something in a file in your Program-Files folder, where the
application is installed:
--> The problem here is, that not every user might have write
permissions to the Program-Files folder.

- Storing something in the %TMP% folder.
--> Better than the above solution, but temp folders get cleaned
sometimes (either by the user itself or by some virus or data
cleanup programs.

- Storing something in the IsolatedStorage.
--> Best solution. Won't get deleted from the %TMP% folder. When you
distribute an application with a StrongName, it uses always the
same IsolatedStorage file, no matter from which location you start
the program etc.

So, mainly some non-technical information but from the practical use -
hope this helps.

Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top