O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Use an Isolated Store

Problem

You need to store data in a file, but your application doesn’t run with the required FileIOPermission.

Solution

Use a user-specific isolated store.

Discussion

The .NET Framework includes support for isolated storage, which allows you to read and write to a user-specific virtual file system that the common language runtime manages. When you create isolated storage files, the data is automatically serialized to a unique location in the user profile path (typically a path like c:\document and settings\[username]\local settings\application data\isolated storage\[guid_identifier]).

One reason you might use isolated storage is to give an untrusted application limited ability to store data. For example, the default common language ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required