n Silverlight application Isolated storage space plays vital role to store information at client side.Since silverlight applications are not allowed to access the file system of the client so If you want to store any information in client side like shopping cart items, user related information or any other application related settings that it can call up the next time the application loads then Isolated storage space can play a handy role.
By default silverlight 2.0 provides 1mb of storage space so what, if we want to store data that can be more than the 1mb size , In that scenarion we can use the IncreaseQuotaTo() method of IsolatedStorageFile object to increase the Quota limit.It will prompt the user for permission to increase the amount of storage space.
In the below example I have used the IncreaseQuotaTo() method of IsolatedStorageFile object to get the user permission to increase the Isolated Storage Quota.
Partial Public Class Page
Public Sub New()
Private Sub IncreaseIsolatedStorageSpace(ByVal lngSpaceRequested As Long)
Dim isfDemo As IsolatedStorageFile
'Obtain the user scoped isolated storage of the current application
isfDemo = IsolatedStorageFile.GetUserStoreForApplication()
'Calculate the new storage quota limit
lngSpaceRequested = isfDemo.Quota + lngSpaceRequested
'Call the function and set the quota increase
If (isfDemo.IncreaseQuotaTo(lngSpaceRequested)) Then
MessageBox.Show("Isolated storage space quota increased")
MessageBox.Show("User cancelled the Quota increase")
Private Sub btnGetQuota_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
'Call the function to increase the Isolated storage Quota
IncreaseIsolatedStorageSpace(1024 * 1024)