PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
BinaryFormatter Alternatives with limitied security priviledges
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
BinaryFormatter Alternatives with limitied security priviledges
![]() |
BinaryFormatter Alternatives with limitied security priviledges |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I want to write class that effectively caches object state between instances
of a WindowsForms application running. The obvious device to use is the [BinaryFormatter] within the Runtime.Serialization namespace. However, I would also like the class to be operable within a No-Touch-Deployment instance, which means I want to work within the IsolatedStorage container, and within the "Internet Zone" I'm not allowed to use the [BinaryFormatter] because of the limited permission set. Is there another way to save and restore the an object instance that is usable within a limited security context? Thanks anyone? -- Phil New Zealand (Aotearoa) |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hope the following articles can be of assistance:
Title: Binary Serialization URL: http://msdn.microsoft.com/library/d...-us/cpguide/htm l/cpconbinaryserialization.asp |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Cheers,
I've read up on it, and basically the formatter throws an exception at construction if it doesn't have enough priveledges. Just 'aint no way to do' binary with out the security pass. Thanks... -- Phil New Zealand (Aotearoa) "Duke Sun" <quansun@microsoft.com> wrote in message news:nBqmxAxODHA.2284@cpmsftngxa06.phx.gbl... > Hope the following articles can be of assistance: > > Title: Binary Serialization > URL: > http://msdn.microsoft.com/library/d...-us/cpguide/htm > l/cpconbinaryserialization.asp > > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Could you please a sample to reproduce the issue?
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
Here's some code:
REM -- Setup initial conditions. Dim myThingToStore As New ArrayList myThingToStore.Add("My Name") REM -- Get the isolated storage file. Dim fileName As String = "WebStorage.bin" Dim isoStore As IsolatedStorageFile Dim oFile As New IsolatedStorageFileStream( _ fileName, FileMode.Create, isoStore) REM -- Serialize the stream. Dim oFormatter As New Formatters.Binary.BinaryFormatter oFormatter.Serialize(oFile, myThingToStore) oFile.Close() This will work if executed from the local machine, but will fail at the "Serialize" call if run from the Internet ("Low" security priveledge). Basically I want to cache object state between instances of a Forms app that is executing within the "NTD" model (hence the need to use IsolatedStorage). Any ideas for a work around? Thanks.... -- Phil New Zealand (Aotearoa) |
|
|
|
#6 |
|
Guest
Posts: n/a
|
OK, I got it. I will update you as soon as possible.
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
The following should be of assistance:
.NET Zero Deployment Security and Versioning Models in the Windows Forms Engine Help You Create and Deploy Smart Clients http://msdn.microsoft.com/msdnmag/i...etSmartClients/ |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Cool, thanks Duke, that's really useful.
Cheers, Phil |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

