Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We currently use some WCF endpoints that were failing when upgrading to Mono 2.11.2. It appears that the cookies in the supplied CookieContainer are being duplicated, causing the cookie-based authentication to fail. In testing, it appears there is a difference in the way Mono and Microsoft handle cookie headers when a CookieContainer is specified. To demonstrate the issue, run compile the following program and examine the cookie header sent.
static void Main(string args)
CookieContainer container = new CookieContainer();
container.Add(new Uri("http://www.mono-project.com"), new Cookie("foo", "bar"));
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://www.mono-project.com/Main_Page");
request.CookieContainer = container;
WebHeaderCollection headers = request.Headers;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Only foo=bar should be sent as the cookie header; Mono currently sends foo=baz,foo=bar. On Microsoft's implementation, it appears that when a CookieContainer is set, it becomes the authoritative source for cookie information and only the cookies present in the CookieContainer are sent.
Submitted pull request with fix, https://github.com/mono/mono/pull/420
Added tests for the expected behavior.