Results 1 to 3 of 3

Thread: Understanding Web.Config *RESOLVED*

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292

    Understanding Web.Config *RESOLVED*

    I'm using the config file for storing some application-wide settings. So I have an entry like this in web.config:

    <appSettings>
    &nbsp&nbsp<add key="A" value="whatever" />
    </appSettings>


    I then grab the value for a key like like this:

    ConfigurationSettings.AppSettings("A")

    Nothing special so far...

    But what I've also got is a web app nested within another web app, so it kind of looks like:

    Parent Virtual Directory
    &nbsp;&nbsp;Web.Config (Key="A"...)
    &nbsp;&nbsp;Parent.aspx
    &nbsp;&nbsp;Child Virtual Directory
    &nbsp;&nbsp;&nbsp;&nbsp;Web.Config (Key="B"...)
    &nbsp;&nbsp;&nbsp;&nbsp;Child.aspx

    The behavior I'm seeing is the Child code can retreive a config setting defined at the parent level. In other words in the above example, child.aspx can make 2 calls :

    ConfigurationSettings.AppSettings("A")
    ConfigurationSettings.AppSettings("B")


    and get a value for each, but each value is coming from a different config file.

    Is this legitimate stuff? Understanding better will really help me out. Thanks!
    Last edited by fungi; Feb 10th, 2003 at 11:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width