Export (0) Print
Expand All

IsolatedStorageFile.IncreaseQuotaTo Method

Enables an application to explicitly request a larger quota size, in bytes.

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

[ComVisibleAttribute(false)]
public override bool IncreaseQuotaTo(
	long newQuotaSize
)

Parameters

newQuotaSize
Type: System.Int64

The requested size, in bytes.

Return Value

Type: System.Boolean
true if the new quota is accepted; otherwise, false.

ExceptionCondition
ArgumentException

newQuotaSize is less than current quota size.

ArgumentOutOfRangeException

newQuotaSize is less than zero, or less than or equal to the current quota size.

InvalidOperationException

The isolated store has been closed.

NotSupportedException

The current scope is not for an application user.

ObjectDisposedException

The isolated store has been disposed.

IsolatedStorageException

The isolated store has been removed.

-or-

Isolated storage is disabled.

The IncreaseQuotaTo method enables an application to explicitly request a larger quota size in bytes. The new quota size must not be smaller than the current quota size, because only quota increases are allowed.

Whenever the IncreaseQuotaTo method is called, isolated storage calls the CheckSecuritySettings method.

You can implement policy decisions by creating a custom AppDomainManager object that overrides the CheckSecuritySettings method so that the object can perform policy decisions based on a IsolatedStorageSecurityState object.

If there is no custom AppDomainManager object, the quota increase request is denied, because the default implementation for CheckSecuritySettings returns false.

Currently, none of the hosts in the .NET Framework provide this customization, so IncreaseQuotaTo always returns false.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft