我正在尝试 Silverlight 的独立存储功能。当前通过 ASP.NET 页面运行 Silverlight。
我已经编写了一些代码来请求额外的存储,但没有提示我添加更多。
private void requestButton_Click(object sender, RoutedEventArgs e)
{
using (IsolatedStorageFile store =
IsolatedStorageFile.GetUserStoreForApplication())
{
if (store.AvailableFreeSpace >= 1000*1024) return;
long usedSpace = store.Quota - store.AvailableFreeSpace;
if (store.IncreaseQuotaTo(usedSpace + 1000*1024))
statusTextBlock.Text =
string.Format("Quota has been increased to {0}", store.Quota);
else
statusTextBlock.Text =
"You have denied quota increase... you Inglorious Basterd...";
}
}
Silverlight 的Application Storage
选项卡确实列出了托管 Silverlight 的 localhost ASP.NET 页面,如下所示。
根据截图,http://localhost:54389
有1.0MB的可用存储区。网站上是否设置了忽略提示
的限制?localhost
Silverlight 提示用户增加配额需要哪些步骤?