|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Q : WebClient.DownloadData not working for HTTPS page through a PROXYsecured site, the page is accessed through the office proxy. Through IE and the appropraite proxy settings I can browse to the page just fine. When I use a webclient to call downloaddata on the page I get the webexception "The underlying connection was closed: Unable to connect to the remote server." which has an inner IOexception of "The operation is not allowed on non-connected sockets." from what I could trace out of the headers I can see that IE sets this when requesting the page Proxy-Connection: Keep-Alive But when I call it through the webclient class this is set instead Connection: Keep-Alive I can't set the Proxy-Connection header properly since it's a protected header, and I can't figure out how to get the WebClient to set this particular header. Does anyone have any idea wats going on here? Thus wrote Marauderz,
Show quote > I'm trying to upload some data via the request headers to a page on a What version of the .NET framework are you using? Do you explicitly use a > secured site, the page is accessed through the office proxy. > > Through IE and the appropraite proxy settings I can browse to the page > just fine. > > When I use a webclient to call downloaddata on the page I get the > webexception > > "The underlying connection was closed: Unable to connect to the remote > server." > > which has an inner IOexception of > > "The operation is not allowed on non-connected sockets." > > from what I could trace out of the headers I can see that IE sets this > when requesting the page > > Proxy-Connection: Keep-Alive > > But when I call it through the webclient class this is set instead > > Connection: Keep-Alive > > I can't set the Proxy-Connection header properly since it's a > protected header, and I can't figure out how to get the WebClient to > set this particular header. Does anyone have any idea wats going on > here? WebProxy instance in your code? Cheers, -- Joerg Jooss news-re***@joergjooss.de Damn.. thought I mentioned it.
I'm using .Net 2.0. I've tried using both explicitly created WebProxy objects, and also obtaining the default system proxy settings. Show quote "Joerg Jooss" <news-re***@joergjooss.de> wrote in message news:94fc5071600698c8fd48189a9a14@msnews.microsoft.com... > Thus wrote Marauderz, > >> I'm trying to upload some data via the request headers to a page on a >> secured site, the page is accessed through the office proxy. >> >> Through IE and the appropraite proxy settings I can browse to the page >> just fine. >> >> When I use a webclient to call downloaddata on the page I get the >> webexception >> >> "The underlying connection was closed: Unable to connect to the remote >> server." >> >> which has an inner IOexception of >> >> "The operation is not allowed on non-connected sockets." >> >> from what I could trace out of the headers I can see that IE sets this >> when requesting the page >> >> Proxy-Connection: Keep-Alive >> >> But when I call it through the webclient class this is set instead >> >> Connection: Keep-Alive >> >> I can't set the Proxy-Connection header properly since it's a >> protected header, and I can't figure out how to get the WebClient to >> set this particular header. Does anyone have any idea wats going on >> here? > > What version of the .NET framework are you using? Do you explicitly use a > WebProxy instance in your code? > > Cheers, -- > Joerg Jooss > news-re***@joergjooss.de > > Thus wrote Marauderz,
> Damn.. thought I mentioned it. Hm... are you sure that your request is really being proxied (by checking > > I'm using .Net 2.0. > > I've tried using both explicitly created WebProxy objects, and also > obtaining the default system proxy settings. your proxy's logs etc.)? Cheers, -- Joerg Jooss news-re***@joergjooss.de Yes, other non HTTPS requests are going out fine. Same proxy settings, going
to the page with IE is fine. Show quote "Joerg Jooss" <news-re***@joergjooss.de> wrote in message news:94fc507160b468c8ffa8f9402978@msnews.microsoft.com... > Thus wrote Marauderz, > >> Damn.. thought I mentioned it. >> >> I'm using .Net 2.0. >> >> I've tried using both explicitly created WebProxy objects, and also >> obtaining the default system proxy settings. > > Hm... are you sure that your request is really being proxied (by checking > your proxy's logs etc.)? > Cheers, > -- > Joerg Jooss > news-re***@joergjooss.de > > |
|||||||||||||||||||||||