Auto Detect Proxy Server for calling a WS from Win Form


mak mak

We have a windows App that calls a webservice, using this bit of basic

Dim objPreReq As PDCPreReq.PreReqs

Dim objProxy As System.Net.WebProxy =

objProxy.Credentials = System.Net.CredentialCache.DefaultCredentials

objPreReq = New PDCPreReq.PreReqs

objPreReq.Url = "" 'Ommitted.

objPreReq.Proxy = objProxy

Return objPreReq.SaveDetails(m_ds)

This all works fine with Proxy servers, until we have Auto Detect Proxy
Server setup in IE.

Now the "System.Net.WebProxy.GetDefaultProxy" returns the entered proxy
settings through IE, which is great, however according to the
and testing for ourselves it does not return the auto detected proxy
settings, and I really need to get hold of this setting for the web
call to succeed.. Looking around the net it would seem that everyone
recommends us putting an entry in the machine or app.config for the
server, however this is not really a reasonable request as the program
be rolled out to handreds of machines and if the proxy setting is
this would require a change to lots of machines, when it would be much
easier to read the settings in from IE.

So my question is does anyone have a reasonable solution to this
are the details stored somewhere in the registry that I could get at

Any help would be great, I really don't want users to have to setup
app.config file each time the sys admin changes a proxy server, after
you don't have to go into IE and change it each time.

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