title: C# HttpWebRequest Request Connection Close
body: <p>Why still waiting the response from Httprequest ? How to close the connection ? Get 100-continue always!</p>
  
  <pre><code>    var request = (HttpWebRequest)WebRequest.Create("http://192.168.0.193/login.aspx");
  
      var postData = "Login=A@Pass=B";
      var data = Encoding.ASCII.GetBytes(postData);
      request.Method = "POST"; //01
      request.KeepAlive = false;
      //request.Connection ="Close"; 
      request.ProtocolVersion = HttpVersion.Version10; //02
      request.Host = "192.168.0.193"; //03
      request.UserAgent = "Mozilla/4.0"; //04
      request.ContentType = "application/x-www-form-urlencoded"; //05
      request.ContentLength = data.Length; //05
      request.Headers.Add("Pragma", "no-cache"); //06
      request.Accept = "*/*"; //07
  
  
  
      using (var stream = request.GetRequestStream())
      {
          stream.Write(data, 0, data.Length);
          stream.Close();              
      }
  
      request.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);            
  
      var response = (HttpWebResponse)request.GetResponse();
  
      var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
  }
  </code></pre>
  
  <p>Please advise.</p>