473,385 Members | 1,370 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,385 software developers and data experts.

Configuration Files

Hey all,

I am trying to add a configuration file to my app so that I can store
configuration options and provide a form to allow the user to change
them. I know that these used to always be in the form of ini files. I
am trying to learn new techniques (OOP etc..) and trying to make my app
as modern as possible. Are XML files the preferred method of doing
this? Whatever the correct way of handling configuration files is, can
someone please provide a link to a tutorial or some good help and how to
work with either ini files, xml files, or whatever is out there as I
have never had a need for a local configuration file in the past.

Thanks!

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
5 1230
You can also save, edit and delete your configurations in the registry.

Set the filter on your search in help to .NET and then search for
'registry' or 'registry key'. It will return several results.

The help files come in handy sometimes, when researching theories and
solutions.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #2
Cor
Hi Ivan,

What is prefered. But an ini file is not prefered.

You can use the dataset methode (do not become scared).

It is very simple to build your config file with it.

You can read it with dsConfig.readXML("myconfig.xml")
You can write it with dsConfig.writeXML("myconfig.xml)"

The most simple method to build it is to open a dataset in your solution
explorer and add the "elements" to it

If you have than questions, ask again.

I hope this helps?

Cor.
Hey all,

I am trying to add a configuration file to my app so that I can store
configuration options and provide a form to allow the user to change
them. I know that these used to always be in the form of ini files. I
am trying to learn new techniques (OOP etc..) and trying to make my app
as modern as possible. Are XML files the preferred method of doing
this? Whatever the correct way of handling configuration files is, can
someone please provide a link to a tutorial or some good help and how to
work with either ini files, xml files, or whatever is out there as I
have never had a need for a local configuration file in the past.

Thanks!

-Ivan

Nov 20 '05 #3
Search for PSS ID Number: Q313405

This describes another method which you can use.

Regards - OHM
Ivan Weiss wrote:
Hey all,

I am trying to add a configuration file to my app so that I can store
configuration options and provide a form to allow the user to change
them. I know that these used to always be in the form of ini files.
I am trying to learn new techniques (OOP etc..) and trying to make my
app as modern as possible. Are XML files the preferred method of
doing this? Whatever the correct way of handling configuration files
is, can someone please provide a link to a tutorial or some good help
and how to work with either ini files, xml files, or whatever is out
there as I have never had a need for a local configuration file in
the past.

Thanks!

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--
Best Regards - OHM
one.handed.man{at}BTInternet{dot}com
Nov 20 '05 #4
I was reading through those posts as suggested and noticed they are
app-wide settings. Will these work for local settings also per each
client. I want it to contain very basic information like the folder
that my access database is stored in (since it will be stored on a
server I want each user to be able to have the option of mapping a drive
etc...) Can I use those classes as described in the article you
provided or do I need to write my own class to read/write from xml
files. It seems that this is something the .NET framework should
provide considering it used to provide functions for dealing with ini
files.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
* Ivan Weiss <iv*****@optonline.net> scripsit:
I am trying to add a configuration file to my app so that I can store
configuration options and provide a form to allow the user to change
them.


Configuration Management Application Block
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp>

<http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

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

Similar topics

1
by: TT (Tom Tempelaere) | last post by:
Hey everyone, I'm currently writing software for a project that uses a lot of Xml files for configuration. The project is written in C#/.NET. Each such xml file has a schema defined for it (Xsd...
5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
5
by: NoNickname | last post by:
Basically, how do I know that the release versions of all components are being published? The Build | Configuration Manager is confusing me a little in VS2005. I have three projects in my...
6
by: yaron | last post by:
Hi all, I want to give a sample console application for the user with 2 configuration files. I want to give also a 2 .bat files for running the sample application, one for each configuration...
0
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com...
9
by: KarlM | last post by:
After reading some articles regarding confuguration data I'm a bit confused. Where is the right place for storing configuration data? - XML-files? - registry? - INI-files? (from a users point...
7
by: Peter Bradley | last post by:
OK. A bit behind the times, I know; but we're just moving over to .NET 2.0. How on earth do you manage configuration settings in a class library in .NET 2.0? In version 1.1, we used a handy class...
4
by: aSoundMind | last post by:
Hi there, I recieve this error Server Error in '/integrate' Application. -------------------------------------------------------------------------------- Configuration Error Description: An...
1
by: ajmerasunny | last post by:
Hi All, I have a java web application in which I need to read a configuration file(WebAgent.conf) that has the reference of another configuration file(SmHost.conf). I am placing both these...
1
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.