New quota must be larger than the old quota exception

9 posts, 1 answers
  1. Scott
    Scott avatar
    66 posts
    Member since:
    Nov 2009

    Posted 15 Aug 2011 Link to this post

    I'm using the Persistence framework to save and load RadDocking and a TreeView to Isolated Storage. I'm using a custom property provider for RadDocking and is working fine.
    After a few saves, I'l get an error "New quota must be larger than the old quota exception" (see attached image). Once this happens I cannot save to Isolated Storage again.  I'm wondering if this is a problem on Telerik's side or am I supposed to catch this error and do something.
  2. Vivek
    Vivek avatar
    50 posts
    Member since:
    Jul 2011

    Posted 15 Aug 2011 Link to this post

    Hi Scott,

    This is a telerik issue. even I am getting same error.

    Thanks,
    Vivek.
  3. Scott
    Scott avatar
    66 posts
    Member since:
    Nov 2009

    Posted 15 Aug 2011 Link to this post

    I tried increasing my Isolated Storage from 1.0MB to 6.0MB and the error went away.

    I'm still curious how Telerik recommends handling this exception. It might be that we are supposed to trap the error and then ask the user to increase the storage size then attempt to save the persistence again.
  4. Answer
    Alex Fidanov
    Admin
    Alex Fidanov avatar
    637 posts

    Posted 16 Aug 2011 Link to this post

    Hi Scott,

    Thank you for reporting this issue. This has already been resolved with the latest internal build (from 15. Aug) and you should not see this exception anymore. The persistence framework would try to increase the quota if needed, but as this action must be user initiated, sometimes it would not succeed. When this happens, you can handle the QuotaRequested event of the IsolatedStorageProvider and check the IsSuccess property to see if the increase was successful. In the event args, you also have the size of the requested bytes and the file streams of the saved data.

    Furthermore, we have exposed a method for quickly increasing the quota on the IsolatedStorageProvider itself.

    Please let me know when you re-test this with the internal build and if you still see this exception occuring.

    All the best,
    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  5. Scott
    Scott avatar
    66 posts
    Member since:
    Nov 2009

    Posted 16 Aug 2011 Link to this post

    Thanks for the information. I probably will not test this for a while because I was using Isolated Storage for learning the persistence framework. I'll be streaming the XML to a database for my project.
  6. sam
    sam avatar
    2 posts
    Member since:
    May 2016

    Posted 30 Jan 2018 in reply to Alex Fidanov Link to this post

    Hello Alex,

    We have the following version of Telerik controls:

    Assembly Telerik.Windows.PersistenceFramework, Version=2016.2.503.45

     

    However I am still seeing the New Quota must be larger than the old quota exception in my WPF application.  All i'm doing is calling the following method, which throws the exception and the user cannot navigate anymore:

    public void Save()
            {
                new IsolatedStorageProvider().SaveToStorage();
            }

     

    Please advise.

  7. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2215 posts

    Posted 31 Jan 2018 Link to this post

    Hello Sam,

    To avoid this you can manually increase the quota by calling the IncreaseQuita() method of the IsolatedStorageProvider.
    IsolatedStorageProvider provider = new IsolatedStorageProvider();
    provider.IncreaseQuota(5000000);
    provider.SaveToStorage();

    Regards,
    Martin Ivanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Markus
    Markus avatar
    1 posts
    Member since:
    Feb 2015

    Posted 21 Sep 2018 Link to this post

    Hello,

    i'm using Telerik.Windows.PersistenceFramework 2016.1.314.45, Windows 10 and .Net 4.5.
    I used the above mentioned approach "call IncreaseQuota()" to increase the quota. I tried even to 50,000,000 bytes for testing.
    I still receive an ArgumentException when calling SaveToStorage().

    Who is managing the isolated storage?
    How can i find out the current quota?
    What is the recommended way of handling those quota issues? I tried to register an QuotaRequested event handler but it is not called even if the quota is increased or insufficient.
    What would be the disadvantage in using e.g. a file stream to store the UI states?

    Thanks in advance.

  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1016 posts

    Posted 26 Sep 2018 Link to this post

    Hello Markus,

    More information about IsolatedStorage and how it is handled can be found in this MSDN article.

    As for finding the current quota, you will need to create a custom IsolatedStorageProvider so that you can access the protected GetIsolatedStoreOverride() method which in turn returns the underlying IsolatedStorageFile. This file in turn holds information for the Quota and AvailableFreeSpace.

    public class CustomIsolatedStorageProvider : IsolatedStorageProvider
    {
        public long AvailableFreeSpace
        {
            get { return this.GetIsolatedStoreOverride().AvailableFreeSpace; }
        }
     
        public long Quota
        {
            get { return this.GetIsolatedStoreOverride().Quota; }
        }
    }

    Regarding the QuotaRequested event, please note that it is not raised when manually increasing the quota via the IncreaseQuota method. It should, however, be raised if the available space is less than what is requested.

    Would it be possible for you to open a new support ticket and send over a small sample project which demonstrates the exception as well as when you're attaching to the QuotaRequested event?

    To address your last inquiry - I cannot think of any disadvantages of saving the layout to a stream instead. If you have any specific concerns, please let me know and I will try to further clarify.

    Please let me know whether providing a sample project with the exception will be possible for you. I look forward to your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top