httpwebrequest

R

RP

Hi all, I am running .net 1.1 sp1 and for some reason when I use
httpwebrequest to submit a request it is adding a "Expect: 100-continue"
header. How do I get rid of it? I have tried setting the Expect to nothing
or an empty string but no luck.

thanks!
 
R

RP

Also, is there anyway I can get Connection: Keep-Alive header added? Setting
KeepAlive = true is not working.

thanks!
 
A

Adrian D. Garcia

Try to put this line before the WebRequest method:

System.Net.ServicePointManager.Expect100Continue = False


--
Regards

Adrian D. Garcia
MCSD
NDSoft Consultoria y Desarrollo
 
A

Adrian D. Garcia

Did you try?

resquest.Headers.Add("Keep-Alive","true");

--
Regards

Adrian D. Garcia
MCSD
NDSoft Consultoria y Desarrollo
 

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

Top