The blog has moved to a new address. The blog is now located at

Friday, August 11, 2006

Why can't I change application scoped settings at runtime?

Application scoped settings are essentially read only from the application's point of view, and aren't meant to be changed by users, but rather only the administrator. An additional reason for this has to do with how the default SettingsProvider stores settings. Application scoped settings are stored in the exe configuration file, and user scoped settings are stored in user.config files located in the user data path. Generally, exe config files should not be written to at runtime by the application, since the user may not have access to them. In addition, it is normally not a good idea for a user to change a file that affects every other user of the application.

Technorati : , , ,


Anonymous said...

But then, how do the administrator change settings (except for manually changing the .exe.config file in notepad (or similar))? What if I would like to build a separate administrator-GUI application for changing the settings in the "normal user"-application? Do I then have to use XMLWriter and XMLReader classes, or?



Taras said...

Yes,you have to use the XMLWriter and XMLReader classes.