473,386 Members | 1,712 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,386 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 1442
"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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.