Challenging ClickOnce problem... can't write to the data store

Ok, I have a program whose solution is composed of (3) projects. I am using ClickOnce as my deployment method and have set the Security Zone to Full Trust.

My configuration.dll, which is one of the (3) projects compiled in my solution, tries to write a config.xml file to the ClickOnce data folder.
FYI: The file does not already exist, so it must create it on the fly.

The problem: It doesn't create it on the fly. It tries to write the file to the correct location but a check of that location reveals that the file is never created and thus cannot be written to.

Does this mean that I need to create a blank config.xml file and include it with the project at compile time? Can files not be created in the 'data directory' of ClickOnce applications?

How can I tell if this is a security zone problem, which I assume it is?

FYI: I do not sign the assemblies, could this be causing the problem? (I am having trouble signing the assemblies)

I have been wrestling with this problem for the last hour so any help, suggestions, and/or advice would be really welcome at this point. ;)

(If you need/want more info just ask, I am monitoring this post)

[1283 byte] By [JBrown9264] at [2007-12-16]
# 1
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.

JohnLudlow at 2007-9-9 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...