Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > configuration settings

Reply
Thread Tools

configuration settings

 
 
rjl
Guest
Posts: n/a
 
      05-16-2006
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?

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      05-16-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?
>



 
Reply With Quote
 
 
 
 
rjl444
Guest
Posts: n/a
 
      05-16-2006

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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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.

 
Reply With Quote
 
Gnic
Guest
Posts: n/a
 
      05-16-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?
>



 
Reply With Quote
 
rjl444
Guest
Posts: n/a
 
      05-16-2006

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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Settings.settings file with settings for multiple regions donet programmer ASP .Net 3 11-20-2009 03:05 PM
Class Library reading web.config Settings OR app.config settings leeanne ASP .Net 0 09-24-2008 05:36 PM
Can't access C\Documents and Settings\Owner\Local Settings? ECLiPSE 2002 Computer Support 2 09-23-2008 01:32 PM
moving "my documents and settings\user\local settings\temp" FredHead Computer Support 11 01-17-2007 06:03 AM
Wanted: Help with Document settings\ServerName\ASPNET\Local settings\Temp Siegfried Heintze ASP .Net 0 10-24-2005 06:02 PM



Advertisments