Can't see anything obvious, but there's a fairly complete example at
http://msdn.microsoft.com/en-us/library/system.security.permissions.isolated
storagefilepermission(v=VS.80).aspx 

 

  _____  

Ian Thomas
Victoria Park, Western Australia

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Maddin, Peter
Sent: Monday, 15 March 2010 1:47 PM
To: [email protected]
Subject: Isolated Storage Security

 

Currently using XP Pro as our SOE. Will be moving to Win 7 with PC fleet
replacement.

 

I want to write my applications so that I can persist application/assembly
settings and also user settings so it will run with Win 7.

This is probably really old ground for most so I apologise for bringing
something up that has probably been dealt to death previously.

 

I have written a really basic application to discover where these are. I am
just adding the possible locations to a listbox.

 

            listBox1.Items.Add("GetMachineStoreForApplication : " +
IsolatedStorageFile.GetMachineStoreForApplication());

            listBox1.Items.Add("GetMachineStoreForAssembly : " +
IsolatedStorageFile.GetMachineStoreForAssembly());

            listBox1.Items.Add("GetMachineStoreForDomain : " +
IsolatedStorageFile.GetMachineStoreForDomain());

            listBox1.Items.Add("GetUserStoreForApplication : " +
IsolatedStorageFile.GetUserStoreForApplication());

            listBox1.Items.Add("GetUserStoreForAssembly : " +
IsolatedStorageFile.GetUserStoreForAssembly());

            listBox1.Items.Add("GetUserStoreForDomain : " +
IsolatedStorageFile.GetUserStoreForDomain());

 

It bombs on the first line with a IsolatedStorageException "Unable to
determine application identity of the caller."

 

>From looking around (Google etc). Once one deploys with ClickOnce this issue
goes away. Ok but what does one do prior to this? What of one wants to use
something other than ClickOnce!

 

What does one do to get it to work? Strongly name it? Does one have to take
some action so that it will work when one  is developing and then another
after one has deployed it.

 

I tried this in the form load event

 

        public Form1()

        {

            InitializeComponent();

 

            IsolatedStorageFilePermission isfp = new
IsolatedStorageFilePermission(PermissionState.Unrestricted);

            isfp.Assert(); 

 

        }

 

But this does nothing.

 

Regards Peter Maddin
Applications Development Officer
PathWest Laboratory Medicine WA
Phone : +618 9473 3944
Fax : +618 9473 3982
E-Mail : [email protected]
The contents of this e-mail transmission outside of the WAGHS network are
intended solely for the named recipient's), may be confidential, and may be
privileged or otherwise protected from disclosure in the public interest.
The use, reproduction, disclosure or distribution of the contents of this
e-mail transmission by any person other than the named recipient(s) is
prohibited. If you are not a named recipient please notify the sender
immediately.

 

Reply via email to