Y
Young Cho
We are trying to hit an IBM web server (Apache-based I believe) via
HttpWebRequest POST method over SSL. The data that is being sent is an XML
package. The request returns the following exception:
The error seems to be in the requestStream.Write() operation. Furthermore,
the code works fine if we switch from HTTPS to HTTP. The test is being done
Finally, when we were fiddling on the web server, we changed the cipher on
the web server from RC4-MD5 to RC4-SHA. That also seems to allow us to get
further over HTTPS. I don't think the SSL cipher on the HttpWebRequest
object is something we can change...
Any thoughts or suggestions would be appreciated. Thank you!
Young.
HttpWebRequest POST method over SSL. The data that is being sent is an XML
package. The request returns the following exception:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
Additional information: A blocking operation is currently executing
The error seems to be in the requestStream.Write() operation. Furthermore,
the code works fine if we switch from HTTPS to HTTP. The test is being done
// Create the HTTP POST request and the authentication headers
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(https://www.myserver.com/testsite);
req.Method = "POST";
req.ContentType = "text/xml";
req.Headers.Add("Authorization: Basic " + authStr); // authStr contains base64 encoded string
byte[] encodedBytes = Encoding.UTF8.GetBytes(payload); // payload is XML string
req.ContentLength = encodedBytes.Length;
requestStream = req.GetRequestStream();
requestStream.Write(encodedBytes, 0 , encodedBytes.Length);
requestStream.Close();
result = (HttpWebResponse)req.GetResponse();
receiveStream = result.GetResponseStream();
StreamReader sr = new StreamReader( receiveStream );
resultstring = sr.ReadToEnd();
Finally, when we were fiddling on the web server, we changed the cipher on
the web server from RC4-MD5 to RC4-SHA. That also seems to allow us to get
further over HTTPS. I don't think the SSL cipher on the HttpWebRequest
object is something we can change...
Any thoughts or suggestions would be appreciated. Thank you!
Young.