If not the registy, then what?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In all the books I have read on .Net, they all recommend that using the
registry in .net is the "old" way. OK, i'll buy that, but hey don't way what
the new way is. Can anyone point me in the right direction?
 
XML Configuration files :)

I use the registry, still, for quite a few things that need to be stored
user-wide for multiple applications that do not have a common shared directory
(IE: Server-Based software and ASP.Net Software). Anywho, check out the XML
config files in MSDN :)

Sorry no links, no time to look em up.

Mythran
 
Scott,

Maybe you can check if Microsoft uses the registry, check for the word
Microsoft by instance in that.

It is in my opinion is the registry not a seperated database so you should
only store in that things, what real acts with the computer. However for
clientcomputer depended things is it in my opinion a good store.

XML is good for settings which are not good hardcoded in the program however
have to be set by instance in advance. What is a XML file more than a new
way of the INI file, from which is so often writen that there was a new
successor for that, "the registry".

However, just my thought.

Cor
 
Cor Ligthert said:
Scott,

Maybe you can check if Microsoft uses the registry, check for the word
Microsoft by instance in that.
Ummm, of course they do :P

It is in my opinion is the registry not a seperated database so you should
only store in that things, what real acts with the computer. However for
clientcomputer depended things is it in my opinion a good store.
Depends on the key and what the data is. When you run a windows setup file
(Windows Installer), it will write information about your application to the
registry. This information is then used to uninstall or reinstall.
XML is good for settings which are not good hardcoded in the program however
have to be set by instance in advance. What is a XML file more than a new
way of the INI file, from which is so often writen that there was a new
successor for that, "the registry".
XML files are the "newest" and "improved" way of storing configuration data.
"MOST" of the time all you have to do is make a change to the xml and the
application will read it once it requires the information. The only time this is
not true is when the application reads from the configuration file when it
starts, and stores the information in memory. Then the configuration file may
not be read until after the application restarts. Remember that, if you want to
be able to update your app settings (stuff in config file), make sure that you
read from the config file occasionally to "refresh" your configuration.
However, just my thought.
Of course it is Cor, you are always thinking...wish we could get more from you :D

jk

Mythran
 
It is recommended that you store user-specific configuration data in
either...
System.Environment.SpecialFolder.ApplicationData
System.Environment.SpecialFolder.LocalApplicationData

The difference is that ApplicationData will follow you from computer to
computer when you are using a roaming profile in a domain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top