title: Error: This Operation cannot be performed after request has been submitted
body: <p>I've written code about <code>httpwebrequest</code> and <code>httpwebresponse</code> . I need to send data to server but got this exception "This operation cannot be performed after request has been submitted". see the following code:</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://"+remoteServer+":8080/");
  request.Credentials = CredentialCache.DefaultCredentials;
  //Stream NewReqstream = request.GetRequestStream();
  request.Method = "POST";
  //request.ContentLength = cmd.Length;
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  Console.WriteLine("Connected..");
  
  // Send the command
  //clientSocket.Send(cmd);
  
  Stream NewReqstream = request.GetRequestStream(); //&lt;-- Error here
  NewReqstream.Write(cmd, 0, cmd.Length);
  NewReqstream.Close();
  </code></pre>