title: Getting Exception from HRESULT: 0x80072F0D when posting to a service in Windows phone 8.1
body: <p>When I am trying to post a data to an API using HttpClient in Windows Phone 8.1, I am always getting <code>Exception from HRESULT: 0x80072F0D</code> exception. In fiddler, it works fine.</p>
  
  <pre><code>try
  {  
      var requestbody="json data"
      HttpClient httpClient = new HttpClient();
      HttpRequestMessage msg = new HttpRequestMessage(new HttpMethod("POST"), new Uri(addressUri));
      msg.Content = new HttpStringContent(requestbody);
      msg.Content.Headers.ContentType = new HttpMediaTypeHeaderValue("application/json");
      HttpResponseMessage response = await httpClient.SendRequestAsync(msg).AsTask();
  }           
  catch (Exception ex)
  {
      getting **Exception from HRESULT: 0x80072F0D**
  }
  </code></pre>
  
  <p>Please tell me what went wrong? </p>
  
  <p>---FYI----</p>
  
  <p>For getting additional information about the HRESULT code : Follow this <a href="http://msdn.microsoft.com/en-in/library/windows/apps/windows.web.weberrorstatus" rel="nofollow">WebErrorStatus enumeration</a></p>
  
  <pre><code>  var exceptionDetail = WebError.GetStatus(ex.GetBaseException().HResult);
  
    if (exceptionDetail == WebErrorStatus.HostNameNotResolved)
    {
      //
    }
  </code></pre>