Silverlight doesn't prompt to increase quota

Posted by Sung Meister on Stack Overflow See other posts from Stack Overflow or by Sung Meister
Published on 2010-04-10T21:02:56Z Indexed on 2010/04/11 13:13 UTC
Read the original article Hit count: 890

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.

alt text

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?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about isolatedstorage