Alex Rivera | Logout

When to use .NET Settings vs config <appsettings>?

Asked 2010-06-04T16:42:59.370
24

Are there any recommendations on when to use Application settings (not per user settings) vs. .config file <appsettings>?

Update
Looking to understand some of the finer and important differences because they're both effectively key/value stores. For example, I know modifying appsettings in web.config will recycle the web application.

Settings have been in .NET for a while now and I haven't bothered to look at them - maybe one is somewhat redundant, or using both at the same time doesn't make sense... that's the kind of detail I'm looking to understand and the reasons.

Edit
Report

1 Answer

0

Application Settings do not get compiled into the assembly.

I'm not sure but I think that the Application Settings default values are compiled into the assembly, but these can be overridden in the config file.

I think Application Settings was created as a more friendly way of doing it, especially from VB.Net, but I don't think there's any huge differences. At least for simple settings I prefer Application Settings for the reasons in LeonG's answer.

answered 2010-06-04T17:04:38.303

Your Answer