By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

Setting HttpWebRequest connection header to "Keep-Avive"

P: n/a
When using .net framework HttpWebRequest object, how can we set the connection header to "keep-alive"
Acording to Microsoft ducomentation, setting the keepAlive property to true, should do the job, but it doesn't seem to do so
When trying to change the header manually (using httpWebRequestObject.Connection = "Keep-Alive") we get the following error
Argument Exception: "Keep-Alive and Close may not be set with this property.

We try the example appears at the HttpWebRequest.Connection Property page in MSND and got the same exception for line myHttpWebRequest2.Connection="Close"

Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.