Vs Registry configuration file for saving custom values ​​in C # .net

I am working on a project that has several components, such as a Windows service, a web service, and a web interface. I have some common configuration values ​​for all of these components. I also need to periodically change the value. Since I need to change the values ​​in all applications, I am going to save the general values ​​in the registry. Is there a drawback in storing values ​​in the registry? Could someone tell me the pros and cons of this. Thanks in advance.

+4
source share
2 answers

There are many flaws in the registry configuration. You cannot easily transfer your configuration to a new environment, you need to implement some kind of user interface to allow editing of users, access to the registry requires permissions that your end user may not have on his machine.

Use a configuration file (e.g. xml) for local configuration or a database if you need a centralized configuration.

+3
source

Using registry settings makes your deployment difficult. You must process it in the settings, as well as during the uninstall process.

It is better to have less space on the client machine.

+2
source

Source: https://habr.com/ru/post/1415922/


All Articles