Isolated Storage - Problem with GetMachineStoreForAssembly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create an Isolated Storage File for my assembly with machine level
scope. I have used the 'GetMachineStoreForAssembly' method to do this and
this creates the Isolated Storage File successfully but when I log onto
another profile and run the code, it creates another Isolated Storage File
(in C:\Documents and Settings\All Users\Application Data\IsolatedStorage\)
rather than writing/reading to/from the existing file. It would seem that a
separate file is being created for each user but I would expect there to be
only one file as the method name 'GetMachineStoreForAssembly' suggests that
the file should have machine level scope and not user level scope. I would
like to have just one copy of the Isolated Storage file rather than one copy
per user as the Isolated Storage file will be used to store application-wide
settings.
 
C#Coder said:
I need to create an Isolated Storage File for my assembly with machine
level
scope. I have used the 'GetMachineStoreForAssembly' method to do this and
this creates the Isolated Storage File successfully but when I log onto
another profile and run the code, it creates another Isolated Storage File
(in C:\Documents and Settings\All Users\Application Data\IsolatedStorage\)
rather than writing/reading to/from the existing file. It would seem that
a
separate file is being created for each user but I would expect there to
be
only one file as the method name 'GetMachineStoreForAssembly' suggests
that
the file should have machine level scope and not user level scope. I would
like to have just one copy of the Isolated Storage file rather than one
copy
per user as the Isolated Storage file will be used to store
application-wide
settings.

Are you running partially trusted or full trust? Sharing data between users
probably requires some additional permissions, for example an assembly
loaded from the web would be prohibited from doing this.
 
Back
Top