473,394 Members | 1,742 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,394 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 2438
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.