New Message on dotNET User Group Hyd

Article: What is Isolated Storage ? (.Net FrameWork Tools Series) -- Interview Q

Reply
  Reply to Sender   Recommend Message 1 in Discussion
From: Nasha

Hey Group,

After a long week end I am back again. Its nice and refreshing after a short vacation so lets get started with .NET once again.

Today we will discuss about Isolated Storage. This is one of the topics which I find interesting as I feel that it has a lot of practical usage or applicability.

We all know that all applications need some storage space to archive certain application information like users preferences, appliction info, or certain data which can be cached on the user's local machine etc. Initially all this information was stored in .ini files which were simple to use and manage. Being a flat file their access was easy and Microsoft also provided us with API's to access these files. But the only problem with .ini files was where do u put these ini files and if the files were lost it would result in an application nightmare.

To solve this problem microsoft came up with an another idea for storing application related information i.e. The Windows Registry. Although registry was good for storing application related information it was very slow coz of its hierarcial nature. Loading information of all the applications in the machine's registry made the search slow. Secondly application downloaded from the web can not be granted access to the local machines registry. Hence it could not be used for web apps.

To solve all the above problems Micorsoft with .NET has now come up with the idea of Isolated Storage.

Isolated storage enables paritally trusted applications to store data as per computer's security policy esp. the web app's and other downloaded components. Code running on the local computer ,local network or the Internet is granted the right to use this isolated storage.

Isolated storage isolates data by user or by assembly. Credentials such as the origin, strong name of the assembly or application domain can be used to isolate data.

But what is isolated storage ?

Well Isolated storage is a special folder on your harddisk which allows your application to store its application specific data. Isolated stores are put up at Microsoft\IsolatedStorage directory.Change folder settings to show hidden files and folders in order to see isolated storage.

On Windows 2000 you will be able to view "IsolatedStorage" folder at :-

Roaming-enabled stores = <drive>\Documents and Settings\<user>\Application Data

Non-roaming stores = <drive>\Documents and Settings\<user>\Local Settings\Application Data

All applications have a special allocated place to store their data which is a data folder containing one or more isolated storage files, called stores in this folder. These stores contain the actual directory locations where data is stored. The data saved in the store can be any kind of data from user's preference information to application state.

To access isolated storage the code must be have appropriate IsolatedStorageFilePermissions and all necessary native platform

operating system rights.

e.g. On an OS like Win 2000 the access control lists (ACLs) controls which users have the rights to use the file system. Hence web applications dont have access to the local hard disk. But these applications have access to the Isolated storage folder on the client machine to store any application data. Thus inspite of not having access to the local harddisk web app can store data related to their application in the IsolatedStorage folder.

Microsoft .NET Framework applications already have operating system rights to access isolated storage unless they perform

impersonation.

Let us use the storeadm.exe tool to list ,add and delete isolated stores.

1) You can go to the VS.NET command prompt and type storeadm.exe /? to view all the options.

Usage : StoreAdm [options]

options : [/LIST] [/REMOVE] [/ROAMING] [/QUIET]

/LIST : Displays the existing isolated storage for the current user.

/REMOVE : Removes all existing isolated storage for the current user.

/ROAMING : Select the roaming store.

/QUIET : Only error messages will be output.

2) Use the storeadm /LIST option to list all the stores on your machine. This will list all the stores in your local machine.

You can use isolated storage just like any other file system folder. There are special IsolatedStorageFileStreams to create files and directories. Tomorrow we will see how we can create these isolated stores.

 

-- Please post your queries and comments for my articles in the usergroup for the benefit of all. I hope this step from my end is helpful to all of us.

Regards,

Namratha (Nasha)

 


View other groups in this category.

Click here!
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to