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.
Created attachment 3521 [details]
minimal testcase to reproduce
The HttpListener class from System.Net does not respect the prefixes it is bound to, but instead listens on all interfaces. This makes it impossible for other programs, like apache to listen on the same port (but different ip), and may also be security-fatal (when listening only on localhost, it should really do so).
Attached is a small testcase that I ran with mono 2.10.9 on OS X Lion, listens on all devices and addresses. The same compiled program on Windows7 + MS .NET only binds to localhost (requires to be run as administrator).
Fixed in master
This bug still exists in 3.4
@Kurt Ward I can't confirm. Just tested the attached example and the bug seems fixed.
mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)
Mono JIT compiler version 3.4.0 (tarball Thu Apr 24 10:23:10 UTC 2014)
both on Ubuntu 14.04.
@Timo You are in fact correct! The problem I was seeing was in a 3rd party lib that rewrites localhost to + by default. I will inform them of the situation, as by default is not desirable. Thanks!