title: System.Net.WebException not intercepted on Windows Phone 8
body: <p>I am trying to call a web service using RestSharp (this has to be done for WP8 onwards).</p>
  
  <p>This is my triggered method:</p>
  
  <pre><code> private async void postRest()
   {
       string getSyncService = "MyService"; 
       var client = new RestClient(ip);
       var request = new RestRequest(getSyncService, Method.POST);              
       request.RequestFormat = DataFormat.Json;
       JsonObject jsonGenericRequest = new JsonObject();
       jsonGenericRequest.Add("companyid", "123");
       jsonGenericRequest.Add("token", "123");            ...
       request.AddParameter("GenMobileRequest", jsonGenericRequest);
       request.AddHeader("Access-Control-Allow-Methods", "POST");
       request.AddHeader("Content-Type", "application/json; charset=utf-8");
       request.AddHeader("Accept", "application/json");
  
       try
       {
           // easy async support
           client.ExecuteAsync(request, response =&gt;
           {
               Console.WriteLine("response content: " + response.Content);
               if (response.ResponseStatus == ResponseStatus.Completed)
               {
                   MessageBox.Show("errorMsg: " + response.ErrorMessage);
               }
           });
       }
       catch (System.Net.WebException ex)
       {
           MessageBox.Show(" "  + ex.InnerException.ToString());
       }
   }
  </code></pre>
  
  <p>On my log I am getting this exception:</p>
  
  <blockquote>
    <p>An exception of type 'System.Net.WebException' occurred in
    System.Windows.ni.dll  and wasn't handled before a managed/native
    boundary</p>
  </blockquote>
  
  <p>I cant even keep any information in my handler</p>
  
  <pre><code>// Code to execute on Unhandled Exceptions
  private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
  {
      Console.WriteLine(" ---Application_UnhandledException---");
      if (Debugger.IsAttached)
      {
          // An unhandled exception has occurred; break into the debugger
          Debugger.Break();
      }
  }
  </code></pre>
  
  <p>How can I get more info about what is wrong?</p>
  
  <p>Any additional information on the proper way to call a WS would be appreciated.</p>
  
  <p>Thanks</p>