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.
[Cycle 7] "System.Net.WebException: Error: NameResolutionFailure" on second web request to certain raw IP addresses with HttpClient
This is a follow-up to Bug 41782. At least when using HttpClient as in the code example below, `ServicePoint.get_HostEntry()`  gets called 2 separate times, once for each request. On the second time, `host` is non-null and `HasTimedOut` is true, so `get_HostEntry()` returns `null` rather than returning the non-null `host`.
## Steps to replicate
Replace the IP address in the following program with a "bad" IP address that hits the problem and run the program.
public static void Main(string args)
public static void DoRequest()
var httpClient = new HttpClient();
var responseTask = httpClient.GetAsync("http://127.0.0.1");
var response = responseTask.Result;
## Regression status: regression in Cycle 7
BAD: Mono 4.6.0 (mono-4.6.0-branch/37dea728) "C8"
BAD: Mono 4.4.2 (mono-4.4.0-branch-c7sr1/b430435) "C7SR1"
GOOD: Mono 4.2.4 (explicit/71b88f3) "C6SR4"
## BAD Results
The second call to `DoRequest()` fails:
> Unhandled Exception:
> System.AggregateException: One or more errors occurred. ---> System.Net.WebException: Error: NameResolutionFailure
## GOOD Results
The app runs to completion without error.
*** Bug 42850 has been marked as a duplicate of this bug. ***
Fixed in master and Mono 4.6