Silverlight doesn't prompt to increase quota

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 = 
        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);
            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?


Perhaps this might seem a bit simplistic but your screen shot shows that the current space used by localhost:54389 is 0.0MB. Hence the AvailableFreeSpace will be 1.0 MB (the size of the current quota). Now your code has this line in it:-

 if (store.AvailableFreeSpace >= 1000*1024) return;

On that basis I would expect your code return at this point.

Need Your Help

Conway Game of Life iteration not working

java swing multidimensional-array jpanel conways-game-of-life

I am trying to make a version of Conway's game of life with JPanel.