This page about storage quotas says to use the mscorcfg tool. BUT the mscorcfg page says the tool is only for older versions of .NET
So... what's the .NET 4 way of setting this value for desktop (not Silverlight) applications?
This page about storage quotas says to use the mscorcfg tool. BUT the mscorcfg page says the tool is only for older versions of .NET
So... what's the .NET 4 way of setting this value for desktop (not Silverlight) applications?
Taking a look at how this is done, it appears you will need to edit the Application Manifest using a tool like MageUI. If you open up your application's manifest and look under the Permissions Required entry you will see that most likely it has the Permission set type of FullTrust, i.e. no quota.
If you change the Permission set type to LocalIntranet or to Internet, you will see an entry in the Details area like so:
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"
Expiry="9223372036854775807"
Permanent="True"/>
Or
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="ApplicationIsolationByUser"
UserQuota="1024000"/>
You will likely need to edit the Permission set to include the IsolatedStorageFilePermission
evidence, run your application, and have it Get/Create the User store. You can verify it worked with the proper quota using the storeadm.exe
tool.
IsolatedStorage.IncreaseQuotaTo() should be what you want...
IsolatedStorage
is an abstract base class. It has one concrete implementation IsolatedStorageFile
, which does not implement IncreaseQuotaTo
under the desktop hosts. –
Macarthur © 2022 - 2024 — McMap. All rights reserved.
storeadm.exe
to enumerate the stores on my machine, but I don't know how to adjust the evidence. – Macarthur