Export (0) Print
Expand All

IsolatedStorageFile.GetStore Method (IsolatedStorageScope, Object, Object)

Obtains the isolated storage corresponding to the given application domain and assembly evidence objects.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public static IsolatedStorageFile GetStore(
	IsolatedStorageScope scope,
	Object domainIdentity,
	Object assemblyIdentity
)

Parameters

scope
Type: System.IO.IsolatedStorage.IsolatedStorageScope
A bitwise combination of the enumeration values.
domainIdentity
Type: System.Object
An object that contains evidence for the application domain identity.
assemblyIdentity
Type: System.Object
An object that contains evidence for the code assembly identity.

Return Value

Type: System.IO.IsolatedStorage.IsolatedStorageFile
An object that represents the parameters.

ExceptionCondition
SecurityException

Sufficient isolated storage permissions have not been granted.

ArgumentNullException

Neither domainIdentity nor assemblyIdentity has been passed in. This verifies that the correct constructor is being used.

-or-

Either domainIdentity or assemblyIdentity is null.

ArgumentException

The scope is invalid.

IsolatedStorageException

An isolated storage location cannot be initialized.

-or-

scope contains the enumeration value Application, but the application identity of the caller cannot be determined, because the ActivationContext for the current application domain returned null.

-or-

scope contains the value Domain, but the permissions for the application domain cannot be determined.

-or-

scope contains the value Assembly, but the permissions for the calling assembly cannot be determined.

This form of GetStore is most useful for administrative code that needs to open a store as if it were another assembly. The store is opened for the evidence provided and not for the currently executing assembly.

NoteNote

If the scope parameter is Domain and the application domain in which the assembly is installed does not have IsolatedStorageFilePermission, the GetStore method will return an IsolatedStorageFile object without a quota. Later attempts to create an IsolatedStorageFile object using the IsolatedStorageFile object that does not have a quota will fail with an IsolatedStorageException.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft