title: Do not receive callback from BeginGetResponse
body: <p>I have trouble following the examples to get the callback.</p>
  
  <p>I have the following code:</p>
  
  <pre><code> private void startWebRequest(object sender, EventArgs e)
      {
          Uri url = new Uri("http://localhost.com/dummyGet");
          HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
          request.BeginGetResponse(new AsyncCallback(ReadWebRequestCallback), request);
      }
  
      private void ReadWebRequestCallback(IAsyncResult callbackResult)
      { 
          Console.WriteLine("Don not get here");
          try
          {
              var req = (HttpWebRequest)callbackResult.AsyncState;
              using (var response = req.EndGetResponse(callbackResult))
              {
                  Console.WriteLine("Code");
              }
          }
          catch
          {  }
      }
  </code></pre>
  
  <p>I have been bangin my head against this all day, I can see the get request in my browser, or with client in fiddler/wireshark. But the code (ReadWebRequestCallback) does not get called.</p>
  
  <p>Edit:
  Also note that if I use WebClient and DownloadStringAsync it works, but i need other HTTP status codes than 404 and 200.: </p>
  
  <pre><code>_client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadStringCompleted);
  _client.DownloadStringAsync(_concurrentCheckUrl);
  }
  
  private void DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {// Works, gets here}
  </code></pre>