Isolated Storage

Isolated Storage Applications frequently need to store state information or user data while they execute and perform some tasks during their run. Conventionally, this information is stored in a temporary place such as the Windows TEMP directory on your root disk. Usually, the path of this folder is a hard-coded value in the application resource files or is automatically set by the environment variables of the environment shell. This path can also be provided to the application from the registry or from a configuration file. Sometimes malicious code can misuse this information to adversely affect your computer systems. 

The .NET Framework eliminates this risk by providing a special capability, isolated storage, for storing data even when no file access is allowed. For example, when a managed control is downloaded from the Internet and run, it is given a limited set of permissions but not the right to perform risky actions such as reading or writing to files. Isolated storage provides a virtual file system that is assigned to an assembly based on the evidence that the assembly presents. 

Isolated storage is a set of types and methods provided by the .NET Framework for local data storage operations. Essentially, each assembly is given access to a distinct storage area on the computer disk. No access to other data is allowed, and isolated storage is available only to the specific assembly for which it is created. For example, isolated storage may be used by an application to keep its activity logs, save settings, or save user or system state data to disk for later use (e.g., for personalization). Because the location of isolated storage is predetermined, isolated storage provides a suitable way to specify unique space for storage without the need to determine file paths as is done for the Windows TEMP directory. Eventually on demand, administrators can remove all user data from isolated storage and perform other tasks using the isolated storage tool named Storeadm.exe. 

On Windows NT/2000/XP operating systems, the isolated storage files are physically stored under different directories, depending upon whether roaming profiles are enabled or not. Roaming profiles allow users to log on to any computer without losing personal settings. If your user profile has roaming enabled, the profile is stored at the server hard disk, as designated by the enterprise administrators. You may consider roaming profiles only if you are part of an administered Windows domain. 

If roaming profiles are enabled, the isolated storage files are stored in this path: 

<%SYSTEMDRIVE%>\Documents and Settings\user\Application Data 

For nonroaming stores, the path for isolated storage files is this: 

<%SYSTEMDRIVE%>\Documents and Settings\user\Local Settings\Application Data 

While restricted code from the local intranet can access and use isolated storage, restricted code from the Restricted Sites zone and from sites that are not trusted has no access to isolated storage. 

Ebook Download
View all
Learn
View all