I am getting the
\"System.Net.ProtocolViolationException: You must write ContentLength bytes to the request stream before calling [Begin]GetResponse\
Your code should work for .NET 2.0 From 4.0 and up you should close the stream after writing:
dataStream = Webrequest.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length); datastream.Close();