I am getting the
\"System.Net.ProtocolViolationException: You must write ContentLength bytes to the request stream before calling [Begin]GetResponse\
This finally worked by using:
using (dataStream = Webrequest.GetRequestStream()) { dataStream.Write(byteArray, 0, byteArray.Length); }
Instead of:
dataStream = Webrequest.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length);