Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

ServicePointManger - https/proxy problem

Hi,

When trying to issue a POST (using HttpWebRequest) we are getting an error back saying "The
ServicePointManager does not support proxies of https"

We have some code that is using HttpsWebRequest to issue a POST to another webserver. This all works fine when we have a direct connection using normal HTTP.

But: we are required to use SSL, and to have a proxy server between the machine issuing the POST and the machine receiving it.

We have configured the web.config file with a <defaultProxy> element to point at the proxy server, but then we get the error message shown above.

A network trace shows we don't even get any connection request to the proxy server - it doesn't look like any bytes are leaving the requesting machine at all.

Does the .NET HttpWebRequest class definitely support SSL connections via a proxy server?

Thanks for any help.

David.

David
Wednesday, February 09, 2005

Apparently setting the proxy server details in code (at the same point where we set up the HttpWebRequest) makes everything work.

Hmm. I had thought that it would have picked the proxy settings up from the web.config file, but it seems not.

David
Wednesday, February 09, 2005

Hello David, I am 100% sure that .NET does not support HTTPS for WebProxy. I am really curious to see some sample code how you solved this. Is it possible to post it here?

Nikola
Monday, February 28, 2005

For ASP.NET applications adding a defaultProxy tag in Web.Config file within <system.net> like below

<defaultProxy>
<proxy proxyaddress="proxyname:8082" bypassonlocal = "true"/>
</defaultProxy>

and also updating the machine.config file for

<proxy usesystemdefault="false" proxyaddress="proxyname:8082" bypassonlocal="true" />

within the <defaultProxy> tags may solve the problem.

Eralper
http://www.kodyaz.com

Eralper Yilmaz
Thursday, June 02, 2005

*  Recent Topics

*  Fog Creek Home