我正在尝试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的本地主机ASP.NET页,如下所示。
根据截图,
http://localhost:54389
有1.0MB的可用存储空间。
有限制吗
localhost
忽略提示的网站?
Silverlight提示用户增加配额所需的步骤是什么?