I’m making a class to POST something on a web page that needs the headers and
data to be in the same package. I have tried the following but nothing
helps(I always get a packet with headers and one with data).
System.Net.ServicePointManager.Expect100Continue = false;
Request.AllowWriteStreamBuffering = false;
Request.ContentType = "application/x-www-form-urlencoded";
According to the documentation about
system.Net.ServicePointManager.Expect100Continue setting this to false
ensures that data and headers are send together, but it does not work this
way.
Does anyone know a solution for this problem?
BRGDS
Martin W. Larsen
Joerg Jooss - 08 Oct 2004 18:30 GMT
> I'm making a class to POST something on a web page that needs the
> headers and data to be in the same package. I have tried the
[quoted text clipped - 11 lines]
>
> Does anyone know a solution for this problem?
There is no notion of packets in HTTP, just requests and responses. All
ServicePointManager.Expect100Continue does is add or suppress HTTP 1.1
Expect headers, so you either have one or two request/response pairs. How
many actual network packets are being sent depends on the underlying network
stack.
Cheers,

Signature
Joerg Jooss
www.joergjooss.de
news@joergjooss.de
Galan Bridgman [MVP-Digital Media] - 16 Nov 2004 21:30 GMT
Martin,
Try moving your Expect100Continue = false call up to before you open your
socket. Not sure how soon this flag has to be set, but putting it before
the Create() works for me. :)
Regards,
Galan Bridgman
Microsoft MVP - Windows XP Digital Media
> I'm making a class to POST something on a web page that needs the headers
and
> data to be in the same package. I have tried the following but nothing
> helps(I always get a packet with headers and one with data).
[quoted text clipped - 12 lines]
> BRGDS
> Martin W. Larsen
fieryMon - 04 Dec 2007 14:46 GMT
This worked really well for me.
'Galan Bridgman [MVP-Digital Media Wrote:
> ;3238534']Martin,
>
[quoted text clipped - 31 lines]
> > BRGDS
> > Martin W. Larsen

Signature
fieryMon