configuration settings

Discussion in 'ASP .Net' started by rjl, May 16, 2006.

  1. rjl

    rjl Guest

    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?
     
    rjl, May 16, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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 T. Llibre, May 16, 2006
    #2
    1. Advertising

  3. rjl

    rjl444 Guest

    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" <> wrote in message
    > news:...
    > >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.
     
    rjl444, May 16, 2006
    #3
  4. rjl

    Gnic Guest

    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" <> wrote in message
    news:...
    >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?
    >
     
    Gnic, May 16, 2006
    #4
  5. rjl

    rjl444 Guest

    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" <> wrote in message
    > news:...
    > >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.
     
    rjl444, May 16, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maellic
    Replies:
    4
    Views:
    458
    Maellic
    Dec 15, 2003
  2. feng
    Replies:
    1
    Views:
    366
  3. Siegfried Heintze
    Replies:
    0
    Views:
    2,337
    Siegfried Heintze
    Oct 24, 2005
  4. leeanne
    Replies:
    0
    Views:
    1,932
    leeanne
    Sep 24, 2008
  5. donet programmer
    Replies:
    3
    Views:
    1,640
    Gregory A. Beamer
    Nov 20, 2009
Loading...

Share This Page