Exactly what is the size limit of Isolated Storage in the Internet
permission set?
I have a document indicating it is 10MB
(http://msdn.microsoft.com/msdnmag/is...tSmartClients/)
There is another document indicating it is 10240 in size
(http://msdn.microsoft.com/library/de...-us/cpguide/ht
ml/cpcondefaultsec uritypolicy.asp )
After running a test to create a directory and an empty file in Isolated
Storate under the Internet permission set, I have found the current size to
be 2048 (sample code at the bottom of this message). This would indicate
that the size is 10Kb in size.
Are my findings correct? If so, is there a way to increase the Isolated
Storage quota under the Internet permissions?
Thanks,
Jody
Sample Code
--------------
Private Sub DetermineCache( )
Dim isoStore As IsolatedStorage .IsolatedStorag eFile
Try
isoStore = IsolatedStorage .IsolatedStorag eFile.GetUserSt oreForDomain()
CreateDir("Test ", isoStore)
MsgBox("Max size: " & isoStore.Maximu mSize.ToString & ControlChars.Cr Lf & _
"Current size: " & isoStore.Curren tSize.ToString)
Catch ex As Exception
MsgBox(ex.ToStr ing)
Finally
If Not isoStore Is Nothing Then
isoStore.Close( )
isoStore.Dispos e()
isoStore = Nothing
End If
End Try
End Sub
Private Function CreateFile(ByVa l p_strIsoPath As String, ByVal p_isoStore
As IsolatedStorage .IsolatedStorag eFile) As
IsolatedStorage .IsolatedStorag eFileStream
Dim isoFile As IsolatedStorage .IsolatedStorag eFileStream
Try
isoFile = New IsolatedStorage .IsolatedStorag eFileStream(p_s trIsoPath,
IO.FileMode.Cre ate, IO.FileAccess.R eadWrite, p_isoStore)
Catch ex As Exception
MsgBox(ex.ToStr ing)
Finally
End Try
Return isoFile
End Function
Private Function CreateDir(ByVal p_strPath As String, ByVal p_isoStore As
IsolatedStorage .IsolatedStorag eFile) As Boolean
'checks if directory exists in isostorage, creates it if not
Dim bolReturn As Boolean
Dim astrDir() As String
Try
astrDir = p_isoStore.GetD irectoryNames(p _strPath)
If astrDir.Length = 0 Then
p_isoStore.Crea teDirectory(p_s trPath)
End If
bolReturn = True
Catch ex As Exception
bolReturn = False
End Try
Return bolReturn
End Function