473,406 Members | 2,867 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,406 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 975
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:...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.