title: Thread abort while making HTTP Get Request
body: <p>Recently I have started receiving alerts with the following stack trace:</p>
  
  <blockquote>
    <p>Message:  Thread was being aborted. </p>
    
    <p>Stack Trace:  at System.Net.Connection.CompleteStartConnection(Boolean
    async, HttpWebRequest httpWebRequest)  at
    System.Net.Connection.CompleteStartRequest(Boolean onSubmitThread,
    HttpWebRequest request, TriState needReConnect)  at
    System.Net.Connection.SubmitRequest(HttpWebRequest request, Boolean
    forcedsubmit)  at System.Net.ServicePoint.SubmitRequest(HttpWebRequest
    request, String connName)  at
    System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint)  at
    System.Net.HttpWebRequest.GetResponse()  at
    <em>removed to protect identity</em></p>
  </blockquote>
  
  <p>It seems to me that the thread is aborted before the actual connection is made with the remote server. Is that true? Why would such a situation occur - trying to narrow down the problem.</p>
  
  <p>I tried looking for documentation on the <code>System.Net.Connection.CompleteStartConnection</code> method and couldn't find anything. Any ideas?</p>
  
  <p>UPDATE: Adding a structure of the calling code in response to comments.</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
  request.Method = method; request.ContentType = "application/xml";
  request.Headers.Add("Foo", "Bar");
  request.Proxy = new System.Net.WebProxy(proxyAddress);
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>UPDATE 2: This alert only occurs sporadically for a few minutes and then goes away.</p>
  
  <p>UPDATE 3: An essential piece of information I hadn't provided yet - The piece of code I displayed in UPDATE 1 is being called by a task which is on a timer.</p>