QUICKSTARTS
[This topic is pre-release documentation and is subject to change in future releases of Microsoft Silverlight.]

Working with Isolated Storage in Silverlight

Introduction

Isolated storage provides safe client-side storage with cookie-like semantics for partial-trust applications. The isolated storage APIs expose a virtual file system and file streams for accessing files in the virtual file system.

Isolated storage in Microsoft Silverlight is based on isolated storage in the .NET Framework. For an overview of isolated storage in the .NET Framework, see Isolated Storage on MSDN.

note

Microsoft Silverlight includes a subset of the .NET Framework class library. In your Silverlight project, you must reference the .NET Framework assemblies that are installed with Silverlight instead of those that are installed with Visual Studio. For information about how to customize the Visual Studio Object Browser to view the Silverlight assemblies, see How to: Explore Silverlight Assemblies with the Visual Studio Object Browser.

Isolated storage in Silverlight has the following characteristics:

  • Each Silverlight-based application is allocated its own portion of storage, and all the assemblies in the application will share that storage. An application is defined by a unique and consistent identifier provided by the host. The virtual directory for the Silverlight-based application (http://www.adventure-works.com/app/, for example) is currently used as an identifier. This identifier should be used consistently so that a given deployment of an application gets the same storage each time it is run.

  • Isolated storage provides access to a virtual file system. The users of the isolated storage are low-trust applications and will not be allowed to access physical file system.

  • The isolated storage APIs are similar to those of the File and Directory classes for enumerating and manipulating files and directories in the virtual file system. They are based on the FileStream APIs for manipulating the contents of files.

  • Isolated storage restricts the total amount of data an application can store by using a quota. The current quota is 1 MB per application.

In This Section

How to: Use Isolated Storage with .NET Framework Silverlight

Demonstrates how to obtain an isolated store and manage files in, save data to, and retrieve data from isolated storage using the .NET Framework for Silverlight.

Page view counter