Bug 11972 - HttpUtility.ParseQueryString() causes subsequent ConfigurationManager.AppSettings calls to fail
Summary: HttpUtility.ParseQueryString() causes subsequent ConfigurationManager.AppSett...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-04-25 15:43 UTC by Andres G. Aragoneses
Modified: 2013-11-15 06:46 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Andres G. Aragoneses 2013-04-25 15:43:05 UTC
Given the App.config is:

<?xml version="1.0" encoding="utf-8" ?>
		<add key="SomeKey" value="value" />

This test fails at the last (3rd) assertion:

    public class Tests
		public void Access_app_setting_fails_after_calling_parse_query_string()
			Assert.That (ConfigurationManager.AppSettings["SomeKey"], Is.Not.Null, "Null on first try");
			Assert.That (HttpUtility.ParseQueryString("example.com?query=value"), Is.Not.Null);
			Assert.That (ConfigurationManager.AppSettings["SomeKey"], Is.Not.Null, "Null on second try");
Comment 1 Andres G. Aragoneses 2013-11-15 06:46:36 UTC
>Kris Krause <kris.krause@....com> changed:
>           What    |Removed                     |Added
>                 CC|                            |kris.krause@....com

Hi Kris

In case you're interested, there was a PR from me some time ago to fix this:


Problem is, I don't think anymore that the approach I used is the correct one. So if you want to maybe try finding the proper fix, you can see the discussions in the pull-request about how I think the approach should be. Unfortunately I haven't found time yet to keep working on this.

Note You need to log in before you can comment on or make changes to this bug.