POSTing data to a webpage
I don't understand this. I have the following code:
Code:
objRequest = WebRequest.Create(strLoginURL)
With objRequest
.Method = "POST"
.ContentType = "application/x-www-form-urlencoded"
.CookieContainer = ckeCookies
End With
Dim stmRequestWriter As New StreamWriter(objRequest.GetRequestStream)
stmRequestWriter.Write(strPostData)
stmRequestWriter.Close()
The code executes okay, but without the desired results. After investigating using a packet sniffer, I've discovered that the POST isn't going through in one go.
If I post the exact same form using IE6, it posts it with all the correct data in the HTTP header. But with my ASP.NET Web Service, it makes the initial POST, and then the rest of the data is stuck into HTTP Continuation packets.
So how is IE6 posting the same (actually more data), in one request, and my service's data is being split up into n difference HTTP segments? :( :confused:
Re: POSTing data to a webpage
Perhaps its getting buffered? If so I thought there was a way to force a flush on a stream...