M
mwieder
The following code hangs at the GetRequestStream after a few loops of
succesful execution:
while (true)
{
HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(new
Uri(strUri));
//add headers here
httpRequest.Method = "POST";
httpRequest.Referer = strReferer;
httpRequest.ContentType = "application/x-www-form-urlencoded";
etc.....
string strPostData = strPostData;
byte[] baData = Encoding.ASCII.GetBytes(strPostData);
request.ContentLength = baData.Length;
Stream newStream = request.GetRequestStream();
newStream.Write(baData, 0, baData.Length);
newStream.Close();
HttpWebResponse httpResponse = (HttpWebResponse)request.GetResponse();
Stream sStream = httpResponse.GetResponseStream()
}
The code works fine the first few times through the loop, but I'm
guessing there is something that needs to be cleeared which is not
getting done so it gets gummed up?
succesful execution:
while (true)
{
HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(new
Uri(strUri));
//add headers here
httpRequest.Method = "POST";
httpRequest.Referer = strReferer;
httpRequest.ContentType = "application/x-www-form-urlencoded";
etc.....
string strPostData = strPostData;
byte[] baData = Encoding.ASCII.GetBytes(strPostData);
request.ContentLength = baData.Length;
Stream newStream = request.GetRequestStream();
newStream.Write(baData, 0, baData.Length);
newStream.Close();
HttpWebResponse httpResponse = (HttpWebResponse)request.GetResponse();
Stream sStream = httpResponse.GetResponseStream()
}
The code works fine the first few times through the loop, but I'm
guessing there is something that needs to be cleeared which is not
getting done so it gets gummed up?