I am trying out Silverlight's Isolated Storage feature. Currently running Silverlight thru ASP.NET page.
I have written some code to request an additional storage but I am not being prompted to add more.
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's Application Storage
tab doeslist the localhost ASP.NET page hosting Silverlight as shown below.
According to the screenshot, http://localhost:54389
has 1.0MB of available storage area.
Is there a restriction set on localhost
websites that a prompt is ignored?
What are the required steps for Silverlight to prompt users to increase quota?