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 ()
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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 11972 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

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.