[Mono-devel-list] HttpWebRequest problem
Namit Dhameja
ndhameja at panaceasoftware.com
Tue Feb 17 22:24:45 EST 2004
Hi all,
I am having a problem while sending out "HttpWebRequest". The problem is unless you close the output stream the message is not getting sent, so the response stream basically times out. Flushing the stream also does not send the message. Sample code
/// <summary>
/// Serialize SOAP data.
/// Set the content length of the string being posted.
/// </summary>
protected Stream stmRequest;
public void sendHttpData()
{
stmRequest = req.GetRequestStream();
byte[] b = ASCIIEncoding.Default.GetBytes(messageToSend);
stmRequest.Write(b,0,b.Length);
stmRequest.Flush();
stmRequest.Close (); // -------------Had to be added <WORKAROUND>
}
Could someone suggest me any other way, is this a well know problem?.
-Best Regards,
Namit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040217/ce7832c0/attachment.html
More information about the Mono-devel-list
mailing list