473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2436
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Namratha Shah \(Nasha\) | last post by:
Hey Group, After a long week end I am back again. Its nice and refreshing after a short vacation so lets get started with .NET once again. Today we will discuss about Isolated Storage. This is...
1
by: Jody Gelowitz | last post by:
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/issues/02/07/NetSmartClients/) ...
3
by: U.C. | last post by:
Hello, My client needs to collect data on a disconnected computer. I am hoping I could store data in Isolated Storage as XML files and expose later to a server (does anyone have experience with...
2
by: Bexm | last post by:
Hello I am running and asp.net web app and have this line of code: IsolatedStorageFile.GetUserStoreForAssembly(); When it is run I get this error: Unable to create the store directory
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.