473,325 Members | 2,771 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,325 software developers and data experts.

Web.Config Get Config settings at runtime.

Hi
How do i access the settings defined in the web.config during runtime. GetConfig method is used to access the user defined sections. i would like to get the customErrors mode defined in the web.config from a code behind page. how do i achieve this

Thanks
Augustin
Nov 18 '05 #1
3 1534
Load the Web.Config into a XPathDocument object, and use XPath to
query the node and attribute you need.

Tommy,

"Augustin Prasanna. J" <an*******@discussions.microsoft.com> wrote in message news:<FE**********************************@microso ft.com>...
Hi,
How do i access the settings defined in the web.config during runtime. GetConfig method is used to access the user defined sections. i would like to get the customErrors mode defined in the web.config from a code behind page. how do i achieve this?
Thanks,
Augustin

Nov 18 '05 #2
Hi,
Is there any other way to access the config settings other than parsing the file. would like to know if there are any classes availble in the API that can be used to read the settings.

Thanks,
Augustin
Nov 18 '05 #3
Check out the System.Configuration namespace.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Augustin" <an*******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Hi,
Is there any other way to access the config settings other than parsing the file. would like to know if there are any classes availble in the API
that can be used to read the settings.
Thanks,
Augustin

Nov 18 '05 #4

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

Similar topics

6
by: Ajay Pal Singh | last post by:
Hi, I am creating a web service, which needs to take some actions based on the config file. I need a way to listen the changes as they occur in the config file so that the service can take...
0
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
3
by: Mads Brydegaard | last post by:
Hi, I have created a custom Config handler for reading a custom config section in my .config file(s) It works very well! I have placed a web.config in my root directory and then I use sub...
3
by: Nuno | last post by:
At first, I was trying to encrypt ConnectionStrings in my app.config and still be able to modify my datasets. So, i had to modify the Settings.Designer.cs file to handle the decryption aspect in...
5
by: Keith | last post by:
Hello all, I have a C# Windows Forms app. It is in namespace App.GUI. It builds to Nav.exe. I have entered an application level setting using the designer. Its type is string, name is "FOO"...
0
by: davemills81 | last post by:
Hi, Does anyone know how to update the user or application settings of a dll after building? The problem I have is? I have recently developed a service in C# that attaches references a dll. ...
0
by: Eric | last post by:
I inherited some code that uses the settings designer to manage some app settings. One of the settings is a connection string that has a DefaultSettingValueAttribute with hard coded text for a...
13
by: Jonny Bergdahl | last post by:
I have a ASP.Net 2.0 web application that I am trying to debug. Problem is that I can't get the error message to show in the browser. It always returns the generic error message telling me to set...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
10
by: =?Utf-8?B?TUNN?= | last post by:
When creating a new VB Web Application Project with VS2008, there are several settings (compiler settings, option strict, etc) that appear both in the web.config file and "My Project". I'm...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.