title: Wait for HttpWebRequest.BeginGetResponse to finish in Windows Phone 7
body: <p>I'm trying to use the async <code>HttpWebRequest</code> in Silverlight for Windows Phone. All works perfect until I get to the where I should call</p>
  
  <pre><code>private static ManualResetEvent allDone = new ManualResetEvent(false);
  ...
  request.BeginGetResponse(new AsyncCallback(GetResponseCallback), request);
  allDone.WaitOne();
  Debug.WriteLine("All done!");
  </code></pre>
  
  <p>In <code>GetResponseCallback</code>:</p>
  
  <pre><code>private void GetResponseCallback(IAsyncResult asynchronousResult)
  {
      try
      {
          request = (HttpWebRequest)asynchronousResult.AsyncState;
          response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
          allDone.Set();
      }
      catch (Exception e)
      {
          Debug.WriteLine("Got Exception in GetResponseCallback: " + e.Message);
      }
  }
  </code></pre>
  
  <p>After the call to <code>allDone.WaitOne();</code> it just hangs...</p>
  
  <p>Any suggestions on why?</p>