configuration settings

R

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?
 
J

Juan T. Llibre

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.





rjl said:
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?
 
R

rjl444

Juan said:
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.





rjl said:
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.
 
G

Gnic

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

Can you provide more detail about your problem?
 
R

rjl444

Gnic said:
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top