Re: Configuration variables

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: William Ryan eMVP (bill_at_NoSp4m.devbuzz.com)
Date: 02/03/04


Date: Tue, 3 Feb 2004 01:15:55 -0500


"Best" depends on your circumstances. The Registry is cool in that it's
easy to use and can store config settings for different users. On the other
hand, not everyone is chomping at the bit to let you hit their registry.
But, the registry does make it harder for people to inadvertantly screw up
your key values and helps to obscure them.

Config files are great and easy to use, but currently they don't let you
write to them, and a user can delete one and cause all sorts of drama.
Here's an example of using a .Config file..
http://www.knowdotnet.com/articles/configfiles.html

On a web app or something more suited to a single user (single user in the
sense of that the app runs only under one or a few logons regardless of how
many users are being served by your app) .config files are probably the way
to go. If you have a ton of people all of whom store custom settings, the
registry might be easier to use.

Also, factor in people tampering with your settings. Most folks have been
warned about messing with the registry, so your average user doesn't go
hacking around it. Someone probably won't delete or play with a .config
file, but in general it's easier to get to.

IMHO, go with the config files though...clean, easy to use, easy to
manipulate etc.
"vineetbatta" <anonymous@discussions.microsoft.com> wrote in message
news:C7DB0320-30E5-4FEC-868B-0C816E0C2828@microsoft.com...
> Hi all,
>
>
> What is the best way to store the configuration varaibles of the
application (E.g: Registry, Web Config file, Xml file , text file etc)?
>
> E.g: of configuration variable is
>
> *Connection string
> *Support Links
> *# of retiries to SQL Server before exiting.
>
> What i am looking for is the an highly fast way to access the variables(
As it will involve disk operation) and also secure.Not inclined to user
Registry -- if i have better option.
>
> Thoughts on the above will be appreciated.
>
> Thanx in advance
>
> Regards
> Vineet Batta



Relevant Pages

  • Re: Configuration variables
    ... Secondly accessing the Configurations varibles from Web.config file than accessing from Registry will be faster. ... Secondly the Admin can manually go and modify the Config file to have new set of values for the variables..... ... Config files are great and easy to use, but currently they don't let you ... If you have a ton of people all of whom store custom settings, ...
    (microsoft.public.dotnet.general)
  • RE: [Full-Disclosure] M$ - so what should they do?
    ... proprietary editor. ... file system API to open and display the config files. ... can you use any editor that uses the registry API to open and display the ...
    (Full-Disclosure)
  • Re: Where to find SCO Termlite?
    ... you can export a registry branch from regedit and then ... My quick experiments with putty showed ... You can configure Putty to be SCO friendly, use its config menu and save the modified settings. ...
    (comp.unix.sco.misc)
  • Re: How to use ADO fast?
    ... I used to do the Registry thing but a lot of our clients don't ... config files. ... >> Cor, hardcoding connection string is silly by any mean, trust us. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: [Full-Disclosure] M$ - so what should they do?
    ... Each config is named after its application, ... > it's easy to know which is which, and if you need to restore ... Because of the registry... ... you can configure auditing on individual keys, so that if you want to you ...
    (Full-Disclosure)