-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Nasha
Message 1 in Discussion

 
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) 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

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.
mailto:[EMAIL PROTECTED]

Reply via email to