http header Proxy-Connection not set to Keep-Alive by setting HttpWebRequest.KeepAlive to true

T

Tim Regan

Hi All,

I'm trying to track down why my application built on HttpWebRequest and
HttpWebResponse fails to successfully log onto and access some web
resourses, while IE does so without problem. The sequence of requests and
responses culminates in a page for IE but in an exception for my application
of type 'System.Net.WebException': The remote server returned an error:
(504) Gateway Timeout.

Using an http sniffer (Ethereal) I can see that IE is setting the http
request header "Proxy-Connection" to "Keep-Alive" while my application does
not send that header. Yet for each new request I make I include the line of
code:
request.KeepAlive = true;
Any pointers as to why setting my HttpWebRequest's KeepAlive property to
true is not resulting in the "Proxy-Connection" header being set to
"Keep-Alive"?

Cheers,

Tim.
 
J

Jim

I'm also encountering this same problem. I have been unable to post
data to a server and the only thing that appears to be diff at this
point is the Connection header attribute is not being set, despite the
KeepAlive prop of HttpWebRequest being set to true.
 

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