Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:52:12+00:00 2026-06-13T12:52:12+00:00

Using ASP.NET under .NET 2.0, is it possible to get/set AppSettings in a web.config

  • 0

Using ASP.NET under .NET 2.0, is it possible to get/set AppSettings in a web.config in a sub-directory, from a page in the root directory? When I say “set”, I do not need a permanent setting of the value, just simply updating the value in memory is sufficient.

I have a web application which has the standard root web.config file, which has system wide configuration settings.

The application also has a number of sub-directories, each one being a separate part of the system, and each having their own web.config file containing configurations that are only necessary for that particular section. (All code within these sections is also built under their own individual NameSpace.)

Is it possible for code within the root directory to get or set an individual <add key="" value=""/> configuration setting from a sub-directory?

So, for example, if I call a page in the root of the web application (e.g. ~/Default.aspx) could it somehow manually lookup an individual configuration value from the ~/Section1/web.config file?

My guess this cannot be done, but I wanted to ask here first


One thought I had – that I’ve tried but doesn’t work – was to have a UserControl within each section with public properties to get the values. Then dynamically load the control from with the root page code and call a property to get the value. However, even though the UserControl is hosted with in the sub-directory, and is part of the sub-directory namespace, it is still not picking up the web.config settings within that sub-directory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:52:13+00:00Added an answer on June 13, 2026 at 12:52 pm

    It can’t be done, its one of the main limitations.

    for some more information (as well as clarification on my statement) have a look Here: Working with more than one web.config… – the author mentions this limitation in his last paragraph before the comments.

    Here is another great resource – 10 things you should know about web.config inheritance

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I change/set permissions of a file or directory using asp.net under mono
Using ASP.NET MVC when trying to get the information stored on my Session[objectName] from
I an developing a web application in ASP.Net using C#, under .Net Framework 4.0.
I am currently developing a web site using ASP.NET 3.5. On a page there
I've got a web service (ASP.NET 2.0) that I'm calling from javascript using jQuery's
I am using ASP.NET ajax to dynamically add/remove controls from a page without using
I am using the following code under ASP.NET 4.0 framework to obtain the version
I have a ASP.NET website deployed under IIS uisng virtual directories. I'm using forms
using ASP.NET 3.5 WebForm using C# 3.0, is it possible to setup a RS
I transformed my VS2008 ASP.NET Website to a Web Application today using VS2010. So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.