Isolated Storage - Problem with GetMachineStoreForAssembly

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.
 
B

Ben Voigt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top