473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

ConfigurationManager.AppSettings returns null when web.config is placed in parent dir

I am facing an amazing problem in ASP.NET. I have a website with many sub directories. The sub directories have aspx and aspx.cs files but do not contain web.config files. I am using the web.config file of the parent directory for storing config items for the respective code files in sub directories. But when i m trying to read the web.config using ConfigurationManager.AppSettings[] with absolutely the correct keys, there's no value being returned. Most amazing fact is, this same code works fine in dev enviroment but not in staging.

Please help..........
Jan 5 '11 #1
1 5403
NitinSawant
270 100+
configure the parent diretory as 'virtual directory' in IIS
Jan 6 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: audipen | last post by:
I have a problem with System.Type.GetType method. If you try out the following code in C# console app .. System.Type t = System.Type.GetType("System.DateTime"); System.Type t1 =...
1
by: James G. Beldock | last post by:
I have seen the following behavior: when issuing a Page.FindControl() for a control which exists in an item template (from within an ItemDataBound() event, for example), I get nulls back...
3
by: natasha | last post by:
Hello everybody, you can use ConfigurationManager.AppSettings.Set method (ConfigurationManager is in System.Web.Configuration namespace) to store a modified value from web.config. To be...
2
by: Peter Kirk | last post by:
Hi there is there any way to tell what .config file the property System.Configuration.ConfigurationManager.AppSettings is trying to access? I have a class which uses this property but no...
2
by: Uldis Bojars | last post by:
Hi All, I have encountered problems with JS RegExp.exec() and can't find what is the problem. Could you help me? formRequest is a function that extracts some information from XMLHTTPRequest...
4
by: Jim in Arizona | last post by:
I've been using VB 2005 for a few years now. My entire coding history is VB related. This weekend I decided to start learning C#. I'm at work now and decided to do some coding in C# that I would...
9
by: Milsnips | last post by:
Hi all. i'm tryng to implement the Rewrite.NET url rewritining functionality into a test project i've created, however i am hitting a problem at this line (direct from the web example): ...
1
by: sandy.82in | last post by:
Hi I'm new to C# , I'm using VS2005 and .NET2.0 .Here is my issue i just developed a simple application with app.config , and a simple class library and following is my app.configfile <?xml...
4
by: alexandis | last post by:
There are tons of articles about custom role and provider membership, but they just tear me apart and confuse :( The situation is following: I use DB2, so I wrote custom role + membership...
10
by: Mourad | last post by:
Hi All, CurrentUser() returns null when called from a form event handler, at least from Form_Open()! However, it works fine in other forms! Use Application.CurrentUser seem to work, but I'd...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.