Auto Detect Proxy Server for calling a WS from Win Form

M

mak mak

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

Dim objPreReq As PDCPreReq.PreReqs

Dim objProxy As System.Net.WebProxy =
System.Net.WebProxy.GetDefaultProxy

objProxy.Credentials = System.Net.CredentialCache.DefaultCredentials

objPreReq = New PDCPreReq.PreReqs

objPreReq.Url = "http://xxxx.com/xxx.aspx" '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
documentation
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
service
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
proxy
server, however this is not really a reasonable request as the program
could
be rolled out to handreds of machines and if the proxy setting is
changed
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
problem,
are the details stored somewhere in the registry that I could get at
them?

Any help would be great, I really don't want users to have to setup
their
app.config file each time the sys admin changes a proxy server, after
all
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

Top