title: HttpWebRequest webservice call returns Request format is invalid: text/xml;charset=UTF-8
body: <p>Trying to call WebService using HTTPWebRequest and posting data, it results in invalid request format, I have added http verbs post in both client and webservice, any ideas here ?</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://localhost/WS/test.asmx/GetData");
  String xmlString =  "Montreal";
  ASCIIEncoding encoding = new ASCIIEncoding();
  byte[] bytesToWrite = encoding.GetBytes(xmlString);
  request.Method = "POST";
  request.ContentLength = bytesToWrite.Length;
  request.ContentType = "text/xml;charset=UTF-8";
  Stream newStream = request.GetRequestStream();
  newStream.Write(bytesToWrite, 0, bytesToWrite.Length);
  newStream.Close();  //fails here with error message Request format is invalid: text/xml;charset=UTF-8.
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  Stream dataStream = response.GetResponseStream();
  StreamReader reader = new StreamReader(dataStream);
  string responseFromServer = reader.ReadToEnd();
  Console.WriteLine(responseFromServer);
  </code></pre>