473,320 Members | 1,794 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.

Web Config vs XML File

I was wondering if anyone could explain to me the differences between a
standard XML file and the Web.Config file for storing application
settings.

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
4 1178
Nothing except the framework handles all the plumbing for the web.config.
They are both XML files.

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
I was wondering if anyone could explain to me the differences between a
standard XML file and the Web.Config file for storing application
settings.

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
"Stuart Ferguson" wrote ...
I was wondering if anyone could explain to me the differences between a
standard XML file and the Web.Config file for storing application
settings.


Hi Stuart,

I dont claim by any accounts to be an expert, however a few things I am
aware of..

your web.config file IS an xml file
the .config extension enables the server to not display it to "punters"
browsing
you can customise it with your own key/value pair items
you can in addition use your own xml file for configuration information
(ontop of the web.config file)

I hope that helps a bit..

Regards

Rob
Nov 19 '05 #3
Yeah. Also if you store your application settings in web.config it is a
snap to pull them out using:

System.Configuration.ConfigurationSettings.AppSett ings("mystuff")

or the new .NET 2.0's

System.Configuration.ConfigurationManager.AppSetti ngs("mystuff")

Speaking of which, why do you have to add a reference to
System.configuration.dll if you want to use ConfigurationManager, but you
don't for just ConfigurationSettings.

Probably obvious, but I'm just not groking it.

Greg
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:en****************@TK2MSFTNGP12.phx.gbl...
Nothing except the framework handles all the plumbing for the web.config.
They are both XML files.

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
I was wondering if anyone could explain to me the differences between a
standard XML file and the Web.Config file for storing application
settings.

Stuart

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #4
Greetings,
I am wandering if someone could give me an insight on following...
I have custom settings in my web.config, such as:
<configSections>
<sectionGroup name="STApplication">
<sectionGroup name="WebUI">
<section name="BackLookup"
"System.Configuration.NameValueSectionHandler,Syst em"/>
<section name="SearchInvoiceList" type=
"System.Configuration.NameValueSectionHandler,Syst em"/>

with following values:
<!-- Custom Configuration Values -->
<STApplication>
<WebUI>
<BackLookup>
<add key="days" value="30"/>
</BackLookup>
<SearchInvoiceList>
<add key="List0" value="--- ALL ---"/>
<add key="List1" value="Client"/>
<add key="List2" value="Parter"/>
</SearchInvoiceList>
</WebUI>
</STApplication>
</sectionGroup>
</sectionGroup>
</configSections>

When I load a page,upon attempting to execute line:
WebConfigParams.NameValueCollection collSearchInvList =
(WebConfigParams.NameValueCollection) System.Configuration.ConfigurationSettings.GetConf ig("STApplication/WebUI/SearchInvoiceList");
I get an exception:
Exception creating section handler.
Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System' could not be loaded.

This is something new to me, failing to loading System assembly...Is there
anything related to rights/security...
Any insight would be appreciated.
Thanks


"Rob Meade" wrote:
"Stuart Ferguson" wrote ...
I was wondering if anyone could explain to me the differences between a
standard XML file and the Web.Config file for storing application
settings.


Hi Stuart,

I dont claim by any accounts to be an expert, however a few things I am
aware of..

your web.config file IS an xml file
the .config extension enables the server to not display it to "punters"
browsing
you can customise it with your own key/value pair items
you can in addition use your own xml file for configuration information
(ontop of the web.config file)

I hope that helps a bit..

Regards

Rob

Nov 19 '05 #5

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

Similar topics

13
by: Maxim Khesin | last post by:
I want to have a config file with my python proggie, satisfying the following requirements: 1) support key->(value, default) 2) simple and intuitive to read and edit 3) easyly readable into a...
4
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
2
by: Suresh Gladstone | last post by:
Hi, This is a bit with versioning and installation of the .NET dlls. I want to perform the following, 1. A third party application will be invoking my .NET dll through COM interop . For this I...
4
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
6
by: Rich | last post by:
Hello, I picked up this example on using the Reflection namespace for loading forms/classes on the fly at msdn http://msdn.microsoft.com/library/default.asp?...
13
by: Khodr | last post by:
Hello, I am using VS.NET 2003 and vb. I build my application MyApp and it generates MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config. Great and no problem! I need to...
3
by: Blasting Cap | last post by:
I am working on a web app that I want to be able to use a separate config file on, in addition to the web.config file that's already working in the application. If I put the following in the...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
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
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.