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

configuration settings

rjl
I have the following in code:

ConfigurationManager.AppSettings["u"]

how come I need to compile for this data to get set? how come it doesnt
read the file at run time? How can I?

May 16 '06 #1
4 972
re:
how come I need to compile for this data to get set?
You don't. All that's needed is for the Application to start.

re: how come it doesnt read the file at run time?
It does.

re: How can I?
What you do is read the value of ConfigurationManager.AppSettings["u"]
from the server's memory.

No compilation; no reading of the file.
web.config is automatically read into memory when the Application starts.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"rjl" <rj****@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...I have the following in code:

ConfigurationManager.AppSettings["u"]

how come I need to compile for this data to get set? how come it doesnt
read the file at run time? How can I?

May 16 '06 #2

Juan T. Llibre wrote:
re:
how come I need to compile for this data to get set?


You don't. All that's needed is for the Application to start.

re:
how come it doesnt read the file at run time?


It does.

re:
How can I?


What you do is read the value of ConfigurationManager.AppSettings["u"]
from the server's memory.

No compilation; no reading of the file.
web.config is automatically read into memory when the Application starts.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"rjl" <rj****@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I have the following in code:

ConfigurationManager.AppSettings["u"]

how come I need to compile for this data to get set? how come it doesnt
read the file at run time? How can I?

that's what it is suppose to do, but I need to recompile for some
reason. in asp 1.1, I did not have this problem.

May 16 '06 #3
Supposingly, IIS will read the value again in runtime if the web.config is
being modified.

Can you provide more detail about your problem?

--
Gasnic
http://gasnicdev.blogspot.com/

"rjl" <rj****@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I have the following in code:

ConfigurationManager.AppSettings["u"]

how come I need to compile for this data to get set? how come it doesnt
read the file at run time? How can I?

May 16 '06 #4

Gnic wrote:
Supposingly, IIS will read the value again in runtime if the web.config is
being modified.

Can you provide more detail about your problem?

--
Gasnic
http://gasnicdev.blogspot.com/

"rjl" <rj****@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I have the following in code:

ConfigurationManager.AppSettings["u"]

how come I need to compile for this data to get set? how come it doesnt
read the file at run time? How can I?

Tonight I will provide the code, but basically, when I change the
web.config, the new data is not used or read until I compile the app.

May 16 '06 #5

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

Similar topics

1
by: serge calderara | last post by:
dear all, I have problem accessing section group in my configuration application file. I got an error saying thta I can have only one section ???? here is my application configuration looks...
3
by: Florida Coder | last post by:
I have the need to store some application specific configuration data to be used by a class library and or a windows service. I would like to do this in a fashion similar to the way we do with...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
5
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want...
5
by: Allan Ebdrup | last post by:
I have a webservice in ASP.Net 2.0, I need to store and load a xml configuration file in relation to one of the web methods in my webservice. What's the best place to store and the best way to load...
4
by: aSoundMind | last post by:
Hi there, I recieve this error Server Error in '/integrate' Application. -------------------------------------------------------------------------------- Configuration Error Description: An...
2
by: Jan Eliasen | last post by:
Hi I am having some problems reading configuration values from a configuration file, using C# 2.0. I have programmed a Windows Service, and this part goes well - it runs nicely. Now, the...
2
by: remya1000 | last post by:
i'm using VB.NET 2003. Last time while i did a program in Vb.Net 2005, i use "Configuration". and i could read and write to that XML configuration file like the example below. CODES:...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
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...
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...

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.