Hi Brad,
Based on my understanding, you're using
WebConfigurationManager.OpenConfiguration() to read from web.config, you
noticed that appSettings and connectionStrings in the Configuration object
contain both settings inherited from parent web.config and settings in
itself. You want to know is it possible to differentiate them or only get
those settings in itself. Please correct me if I've misunderstood anything.
I've done some researching and looked into the WebConfigurationManager's
source code using Reflector (
http://www.aisto.com/roeder/dotnet/),
unfortunately it seems not possible to only return a Configuration object
with settings from the web.config itself in current .NET framework version.
Your objective is a reasonable one and we're sorry for the inconvenience
caused. I will make sure your feedback gets forwarded to product team.
For now, I'm afraid you will have to read the web.config yourself to
determine which appsettings or connectionstrings are in it. I can give
further suggestion if you could elaborate more about your objective. Thanks.
In the meanwhile, you're also welcome to submit your feedback at
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 which
is monitored by our product team directly. Thanks again for your feedback.
Sincerely,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.