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.
8 Answers, 1 is accepted

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

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.
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 >>


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.
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

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.
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