Are you trying to use IsolatedStorage or the DataDirectory? If you are writing to the DataDirectory, then you'll need FileIO permissions. If you're writing to the IsolatedStorage, then you will only need IsolatedStorageFile permissions, which you will usually have (even on the restricted Internet permission set), but you'll need to use streaming to read and write the file.
I found this out when I tried to make a test app to play with ClickOnce, and expected to just be able to do xmlDoc.Load to load in my configurations XML file. But no, I had to create a stream and reader/writer pair with the correct file mode and access, and do something like
xmlDoc.LoadXml(reader.ReadToEnd());
It may be a good idea to make a helper to simplify this bit. |