I have had similar issues with .NET program installations. It has always been a permissions issue. To test if this is your problem, you should try running your application as an unprivileged user - developers tend to have administrator rights...whenever they can manage it.
If it fails, edit the security of the config file (as an administrator) to allow the "Users" group write access to your "bin" folder, and try it again. If it works, you've identified the problem. Then you can figure out what the best solution is. Some options would be:
- Set access rights to necessary files/folders from your installer to work for the users that will run the application
- Run the application as a user with admin rights (NOT a good idea from a security best-practices point of view)
Instead of modifying the main app settings file, create a separate settings section referencing a file that has the data that can be changed:
<configuration> <configSections> ... <section name="MyChangableSettings" type="My.Namespace, ChangableSettingsClass"/> </configSection> ... <MyChangableSettings configSource="Path\To\Writable\StorageDir\mySettings.config"/> </configuration>