title: How to catch exceptions thrown from HttpWebRequest.GetResponseAsync?
body: <p>I have the following method:</p>
  
  <pre><code>private static async void SendRequest()
  {
      HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://google.com");
      httpWebRequest.KeepAlive = false;
      httpWebRequest.Proxy = null;
      httpWebRequest.Timeout = 1;
      try
      {
          await httpWebRequest.GetResponseAsync();
          Console.WriteLine("GetResponse Finished");
      }
      catch (Exception ex)
      {
          Console.WriteLine("Exception thrown="+ex);
      }
  }
  </code></pre>
  
  <p>This throws an exception in case of failure to resolve name, but it never seems to throw an exception in case of timeout. If I use GetResponse with the unrealistic timeout of 1 ms, it always throws an timeout exception, but this doesn't seem to happen with GetResponseAsync.</p>
  
  <p>Any idea how I can get Timeout exceptions to be thrown and handled like the synchronous method ?</p>