title: HttpClient HttpRequestException
body: <p>I'm having a problem with <code>HttpClient</code>, I keep getting <code>HttpRequestException occurred in mscorlib.dll</code>. I've downloaded previous working versions from SVN and I keep getting the same Exception.</p>
  
  <p>Why am I suddenly getting this exception, even when I'm running code that has been working fine for weeks?</p>
  
  <p>Right now I'm trying to debug with this simple code, but I get the same exception whatever I do</p>
  
  <pre><code>HttpClient client = new HttpClient();
  client.DefaultRequestHeaders.Accept
      .Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue(
                "application/json"));
  HttpResponseMessage response
      = await client.GetAsync("http://api.themoviedb.org/3/movie/550?api_key=x");
  return await response.Content.ReadAsStringAsync();
  </code></pre>
  
  <p>My innerException is the following:</p>
  
  <pre><code>The remote name could not be resolved: 
      api.themoviedb.org System.Exception System.Net.WebException
  </code></pre>
  
  <p>I get the same for every url I try and they all work in my browser.
  Here is the exception and stack trace:</p>
  
  <pre><code>res "System.Net.Http.HttpRequestException: An error occurred while sending the request. 
  ---&gt; System.Net.WebException: The remote name could not be resolved: 'api.themoviedb.org'
  at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
  at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
  --- End of inner exception stack trace ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat‌​ion(Task task)
  </code></pre>