IsolatedStorageFile.GetUserStoreForApplication Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Obtains user-scoped isolated storage for use by an application that calls from the virtual host domain.

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


Public Shared Function GetUserStoreForApplication As IsolatedStorageFile
public static IsolatedStorageFile GetUserStoreForApplication()

Return Value

Type: System.IO.IsolatedStorage..::.IsolatedStorageFile
The isolated storage file that corresponds to the isolated storage scope based on the identity of an application in a virtual host domain.


Exception Condition

The group quota for the store is set to zero.


The store has been removed but cannot be recreated because a directory or file is being used by another process.


Isolated storage is disabled.


An application on a domain (Web site) shares a group quota with all the other applications in that domain. This enables multiple applications in the same domain to share a single quota. Note that domain in this context refers to a virtual host domain, such as, not to an application domain.

The default isolated storage size for a group quota is 1 megabyte. To increase the quota, use the IncreaseQuotaTo method.

If an earlier call to the Remove method failed, the GetUserStoreForApplication method does not clean up the directories or files in the store. Any subsequent attempts to modify the store throw an IsolatedStorageException exception. In this case, you must ensure that the files or directories are explicitly deleted.


The following example obtains a store. This example is part of a larger example provided for IsolatedStorageFile class.

Using store As IsolatedStorageFile = _


End Using
using (var store = IsolatedStorageFile.GetUserStoreForApplication())



Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


IsolatedStorageFile Class

System.IO.IsolatedStorage Namespace