GetRequestStream blocks

  • Thread starter Thread starter Mike Markiewicz
  • Start date Start date
M

Mike Markiewicz

I need help from someone who's familiar with HttpWebRequest. I'm trying to
extract data from a website that requires you to log in. I'm using the
GetRequestStream method to send the POST data.

I can successfully get through logging in, but there is a second post that
has to be done. When I call GetRequestStream a second time, it stays inside
the function. I haven't yet waited long enough to see what eventually might
happen.

I've already tried using a separate variable for both the HttpWebRequest and
the Stream, but the results are the same. Is there any reason it isn't able
to get a stream? I closed the first one.

Thanks,
Mike
 
Mike Markiewicz said:
I need help from someone who's familiar with HttpWebRequest. I'm trying to
extract data from a website that requires you to log in. I'm using the
GetRequestStream method to send the POST data.

I can successfully get through logging in, but there is a second post that
has to be done. When I call GetRequestStream a second time, it stays
inside
the function. I haven't yet waited long enough to see what eventually
might
happen.

If you want retrieve data from website you should consider
HttpWebResponse.GetResponseStream();
 
I'm trying to get a stream that I can write POST data to....
 
It's working. I think what fixed it was making sure to close all the
previous streams and response objects.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top