So I writed a complete software, and I included one custom file in the installer to hold some settings the program will need to run.

The thing is that the program will need to write to this file when the user changes settings. When I run the program from Visual Studio it gives no problem, but then when instalation is made, it gives me this creepy exception :(, this happens in windows 7 only
user is administrator, and if not, he is prompted for permision from the installer to install the files, isn't that enough?

The file is accesed many times from TextReader and TextWriter wrappers.

I need help, on solving this, the internet is plagged with useless solutions.

Thanks.

I know no one replied... I usually do forum posts requesting for help when I'm desperate xD.

Anyways. I found the very solution. And is making your app "Full Trust"

I'm running Visual Studio 2010, simply go to your project in Solution Explorer, right click->properties, and click the tab security.

Then Check the "Click Once Security Settings" and select This is a full trust application. And Rebuild All

If someone would like to add something else is welcome :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.