473,320 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Configuration variables

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
Jul 21 '05 #1
3 1439
"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" <an*******@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.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

Jul 21 '05 #2

Vineet,

The better option would be the config file only. The configuration sections themselves are section handler classes and pre-compiled and loaded to memory. If you want to have a secured configuration file, consider encrypting the connection strings using a signature.

http://weblogs.asp.net/shawnfa/archi.../22/61779.aspx

HTH
Sudhakar Sadasivuni
Microsoft .NET MVP | MCAD
http://weblogs.asp.net/ssadasivuni
www.mugh.net

----- vineetbatta wrote: -----

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
Jul 21 '05 #3
In this case the thier will single user setting for the all the users. Probably this will be done by the admin
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..... as long he does not mess up the XML. :-

Thanx Ryan

Batt

----- William Ryan eMVP wrote: ----

"Best" depends on your circumstances. The Registry is cool in that it'
easy to use and can store config settings for different users. On the othe
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 u
your key values and helps to obscure them

Config files are great and easy to use, but currently they don't let yo
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.htm

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

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

IMHO, go with the config files though...clean, easy to use, easy t
manipulate etc
"vineetbatta" <an*******@discussions.microsoft.com> wrote in messag
news:C7**********************************@microsof t.com..
Hi all
What is the best way to store the configuration varaibles of th
application (E.g: Registry, Web Config file, Xml file , text file etc) E.g: of configuration variable i
*Connection strin

*Support Link
*# 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 use
Registry -- if i have better option Thoughts on the above will be appreciated
Thanx in advanc
Regard

Vineet Batt


Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Famille Delorme | last post by:
Sorry if this discussion are already submited, but I don't find anything really interresting for me. And sorry for my bad english, it is not my native language. I wrote a program in Python for a...
4
by: Jessard | last post by:
Hi Guys and Girls, I have a situation where I am wishing to deploy a .NET dll onto a number of servers. The classes in the DLL will be used by VBScripts. When one of the classes - Connection -...
4
by: Oliver Stratmann | last post by:
Hello All, does anyone know, where the configuration of a db2-client on a windows-machine is stored? I searched the registry and the filesystem on my machine and couldn't find anything. Is...
6
by: chokk | last post by:
All, I am getting the following error when I try to run a form page. Can someone tell me what this is about and show me how to fix it. Thnaks. Server Error in '/' Application...
1
by: QT | last post by:
Hi. Is it possible to use configuration files with a shared add-in component? I have added one to my solution for the add-in, but I can't pick up the values from my config file. If my...
3
by: vineetbatta | last post by:
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 ...
5
by: Jay | last post by:
I want to store various text settings in a configuration file, that I will read into C# and make use of. Here's a simplified example of the file: #comment loop(var=1:5){ deviceundertest ...
4
by: =?Utf-8?B?SmFzb24gUmljaG1laWVy?= | last post by:
Is there a way to catch an application configuration error on startup? I have written a windows service. If there is an error in the configuration file (such as invalid xml) the exception is...
0
by: Thom Little | last post by:
The best source of information I found anywhere on the Configuration is "Unraveling the Mysteries of .NET 2.0 Configuration" at...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.