Soap connect and dynamic proxy setting


Kenneth Jonsson

My customer uses automatic proxy settings, from a configuration script, as
defined in Internet Explorer / Internet options / LAN settings. My program,
in C++, can not connect to my web services server using a
HttpConnector30object, even though I have stated:
soapConnector->Property["ProxyServer"] = _T("<CURRENT_USER>");
soapConnector->Property["EnableAutoProxy"] = _T("TRUE");
However, if the user defines proxy server settings as adress:port my program
succeeds to connect. Connect through IE works with automatic setting.

Question: Is there a way to make my SOAP connect to use automatic proxy
setting in the configuration file, the same way as IE does?


Kenneth Jonsson
Signifikant Svenska AB
Industrivägen 19
SE-171 48 Solna
Tel: +46 76 858 00 15

Dan Rogers

Hi Kenneth,

Try something like this:

myproxy.v1 erviceProxy = new myproxy.v1();
serviceProxy.Proxy = new System.Net.WebProxy("proxyURL", true);

The first line is creating an instance of a web service proxy that I
created with add web reference. The second line sets up the HTTP proxy
server settings for that class to use by adding a WebProxy to the web
service proxy. The overload I chose here assumes current user, and
bypassing the proxy server for local addresses.

I hope this helps

Dan Rogers
Microsoft Corporation


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

Members online

No members online now.

Forum statistics

Latest member

Latest Threads