D
Dan
I'm experimenting with HttpWebRequest. After I've created a request:
m_request = (HttpWebRequest) WebRequest.Create(uri);
I'd like to repeatedly send requests to the URI, as follows:
public void SendRequest(string body)
{
StreamWriter stream = new
StreamWriter(m_request.GetRequestStream(),Encoding.ASCII);
stream.Write(body);
stream.Close();
}
However, the second time I send the request I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Additional information: Stream was not writable.
Does anybody know why that happens?
Thanks...
Dan
m_request = (HttpWebRequest) WebRequest.Create(uri);
I'd like to repeatedly send requests to the URI, as follows:
public void SendRequest(string body)
{
StreamWriter stream = new
StreamWriter(m_request.GetRequestStream(),Encoding.ASCII);
stream.Write(body);
stream.Close();
}
However, the second time I send the request I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Additional information: Stream was not writable.
Does anybody know why that happens?
Thanks...
Dan