473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 7537
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.