469,602 Members | 1,781 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Isolated Storage Space in Internet Permission Set

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/cpcondefaultsecuritypolicy.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.IsolatedStorageFile

Try

isoStore = IsolatedStorage.IsolatedStorageFile.GetUserStoreFo rDomain()

CreateDir("Test", isoStore)

MsgBox("Max size: " & isoStore.MaximumSize.ToString & ControlChars.CrLf & _

"Current size: " & isoStore.CurrentSize.ToString)

Catch ex As Exception

MsgBox(ex.ToString)

Finally

If Not isoStore Is Nothing Then

isoStore.Close()

isoStore.Dispose()

isoStore = Nothing

End If

End Try

End Sub

Private Function CreateFile(ByVal p_strIsoPath As String, ByVal p_isoStore
As IsolatedStorage.IsolatedStorageFile) As
IsolatedStorage.IsolatedStorageFileStream

Dim isoFile As IsolatedStorage.IsolatedStorageFileStream

Try

isoFile = New IsolatedStorage.IsolatedStorageFileStream(p_strIso Path,
IO.FileMode.Create, IO.FileAccess.ReadWrite, p_isoStore)

Catch ex As Exception

MsgBox(ex.ToString)

Finally

End Try

Return isoFile

End Function

Private Function CreateDir(ByVal p_strPath As String, ByVal p_isoStore As
IsolatedStorage.IsolatedStorageFile) As Boolean

'checks if directory exists in isostorage, creates it if not

Dim bolReturn As Boolean

Dim astrDir() As String

Try

astrDir = p_isoStore.GetDirectoryNames(p_strPath)

If astrDir.Length = 0 Then

p_isoStore.CreateDirectory(p_strPath)

End If

bolReturn = True

Catch ex As Exception

bolReturn = False

End Try

Return bolReturn

End Function
Jul 21 '05 #1
1 2287
Jody -
yes, it is 10240 bytes for Internet by default. You can actually see it if
you look at the Internet named permission set in the security policy in the
".NET Framework Configuration" tool (from the control panel) or by running
"caspol -l" in the command line.
You can change that by creating a new permission set (or modifying the
existing Internet permission set), changing the quota value in the
IsolatedStorageFilePermission there and assigning it to the code group
corresponding to the Inernet zone. This can be done using the tools
mentioned above.
--Ivan
http://blogs.dotnetthis.com/ivan
http://www.dotnetthis.com
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jody Gelowitz" <jo**@mail.visualstatement.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
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/cpcondefaultsecuritypolicy.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.IsolatedStorageFile

Try

isoStore = IsolatedStorage.IsolatedStorageFile.GetUserStoreFo rDomain()

CreateDir("Test", isoStore)

MsgBox("Max size: " & isoStore.MaximumSize.ToString & ControlChars.CrLf & _
"Current size: " & isoStore.CurrentSize.ToString)

Catch ex As Exception

MsgBox(ex.ToString)

Finally

If Not isoStore Is Nothing Then

isoStore.Close()

isoStore.Dispose()

isoStore = Nothing

End If

End Try

End Sub

Private Function CreateFile(ByVal p_strIsoPath As String, ByVal p_isoStore
As IsolatedStorage.IsolatedStorageFile) As
IsolatedStorage.IsolatedStorageFileStream

Dim isoFile As IsolatedStorage.IsolatedStorageFileStream

Try

isoFile = New IsolatedStorage.IsolatedStorageFileStream(p_strIso Path,
IO.FileMode.Create, IO.FileAccess.ReadWrite, p_isoStore)

Catch ex As Exception

MsgBox(ex.ToString)

Finally

End Try

Return isoFile

End Function

Private Function CreateDir(ByVal p_strPath As String, ByVal p_isoStore As
IsolatedStorage.IsolatedStorageFile) As Boolean

'checks if directory exists in isostorage, creates it if not

Dim bolReturn As Boolean

Dim astrDir() As String

Try

astrDir = p_isoStore.GetDirectoryNames(p_strPath)

If astrDir.Length = 0 Then

p_isoStore.CreateDirectory(p_strPath)

End If

bolReturn = True

Catch ex As Exception

bolReturn = False

End Try

Return bolReturn

End Function

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.