473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Auto Detect Proxy Server for calling a WS from Win Form.

Appologies if this has already been asked, but after scanning the web and
this news group I could find no decent solution.

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.

Steve.
Nov 23 '05 #1
1 7573
Hi Steve,

You are right - at least for now, you have to know the name of a proxy
server to interface with in order to do so.

Regards

Dan Rogers
Microsoft Corporation
--------------------
From: "Steve.Goodman" <mail@<NOSPAM>,SteveGoodman.co.uk>
Subject: Auto Detect Proxy Server for calling a WS from Win Form.
Date: Thu, 9 Dec 2004 15:33:38 -0000
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <#J**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 62.232.221.34
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7998
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Appologies if this has already been asked, but after scanning the web and
this news group I could find no decent solution.

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.

Steve.

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Yang Li Ke | last post by:
Hi guys, What's a good way to detect if an ip is a proxy ? Thanx ! :) -- Yang
0
by: Richard | last post by:
I am having trouble accessing a web page programmatically from .NET. Our proxy server is determined by a PAC script and all the standard .NET (and WinHttp) proxy techniques don't work for scripts....
1
by: John | last post by:
Hi I am trying to call a web service from behind a MS ISA Server on a sbs2003 machine. The calling program is coming up with this error; The request failed with HTTP status 407: Proxy...
5
by: SK | last post by:
Hi, We have 2 Servers in our Production Environment. Inside our application I am calling a Webservice in Production Server 2 from Production Server 1. It is failing. But when I try to open...
6
by: | last post by:
Hi, can someone provide some advise on how to get around with using auto generated proxies? basically I already have the proxy classes, and they are used by other places. I'd like use these...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
0
by: =?Utf-8?B?Y29kZW11dHQ=?= | last post by:
I've got a problem where my HTTP WCF messages are not going where I want them to go because my company has tightened its proxy restrictions. Basically the AUTO-DETECTION of a proxy that has been...
11
by: mp- | last post by:
I want to be able to allow people to check their email from my PHP online application. Given only the users 1) email address, 2) username (if applicable) and 3) password - how can I auto detect...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.