I am developing a .NET 4.0
Console Application to serve as a SOAP Web Service
client which will send data (POST) through to a third-party. I have no c
Use the following in place of your current code to send the request.
using (Stream stream = request.GetRequestStream())
using (GZipStream gz = new GZipStream(stream, CompressionMode.Compress, false))
{
soapXml.Save(gz);
}
Edit: Might need to use "new GZipStream(stream, CompressionMode.Compress, true)". Can't say for certain how that constructor parameter will affect the web request stream.