Silverlight 如何增加隔离存储的大小?

Silverlight 如何增加隔离存储的大小?,silverlight,silverlight-5.0,Silverlight,Silverlight 5.0,我尝试使用以下代码增加IsoLatedStorage的大小: using (IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication()) { if (iso.FileExists(fileName)) iso.DeleteFile(fileName); iso.IncreaseQuotaTo(iso.Quota + memoryStream.Length); //..... }

我尝试使用以下代码增加IsoLatedStorage的大小:

using (IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication())
{
   if (iso.FileExists(fileName))
     iso.DeleteFile(fileName);

   iso.IncreaseQuotaTo(iso.Quota + memoryStream.Length);
   //.....
}
但我不能,我在EncreaseQuotaTo调用之前和之后检查了iso.Quota,它没有更改。看起来像代码iso.IncreaseQuotaTo(iso.Quota+memoryStream.Length);不工作。然后我得到了一个错误:没有足够的空间来执行操作。当我尝试将memoryStream写入IsolatedStream时


不知道为什么。如何解决这个问题?

我不确定这是否是您的问题,可能没有增加,因为如果您想增加独立存储配额,您必须询问用户(使用messagebox或类似的东西),否则我认为它不会起作用