configuration settings

  • Thread starter Thread starter rjl
  • Start date Start date
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?
 
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 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?
 
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.




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 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.
 
Supposingly, IIS will read the value again in runtime if the web.config is
being modified.

Can you provide more detail about your problem?
 
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

Back
Top