473,406 Members | 2,954 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,406 software developers and data experts.

Webservices behind Authenticated Proxy

Can anyone provide some guidance, example, and/or links for configuring a client behind an authenticated proxy to access a web service via the Internet?

Thanks,

Sam

--
_______________________________
Sam Santiago
ss*******@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
Nov 23 '05 #1
4 2141
Sam,

by working on some web services stuff I stumbled over the GlobalProxySelection class (see online help for more details).
So I think you need to do something like:

Uri proxyURI = new Uri("http://someproxy:80");
WebProxy myProxy = new WebProxy(proxyURI);
myProxy.Credentials = new NetworkCredential("<userid for proxy>", "pwd for proxy>");
GlobalProxySelection.Select = myProxy;
HTH,
Stefan

"Sam Santiago" <ss*******@n0spam-SoftiTechture.com> schrieb im Newsbeitrag news:e1**************@TK2MSFTNGP10.phx.gbl...
Can anyone provide some guidance, example, and/or links for configuring a client behind an authenticated proxy to access a web service via the Internet?

Thanks,

Sam

--
_______________________________
Sam Santiago
ss*******@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
Nov 23 '05 #2
Hi,

Pseudo:

WebRef myWS = new localhost.WebRef();
// Setup Credentials for endpoint
myWS.Credentials = DefaultCrendentials;

// Setup Credentials for Proxy
myWS.Proxy.Credentails = .....;

Result = myWS.ExecuteMethod(XMLDomDoc);
Hope this helps,

Marvin Smit.
On Wed, 31 Aug 2005 21:36:24 -0700, "Sam Santiago"
<ss*******@n0spam-SoftiTechture.com> wrote:
Can anyone provide some guidance, example, and/or links for configuring a client behind an authenticated proxy to access a web service via the Internet?

Thanks,

Sam


Nov 23 '05 #3
Thanks guys for the examples. I was trying to the use the WebProxy.GetDefaultProxy() function to read the IE settings, but it's returning an empty WebProxy object. Has anyone seen this behavior and have a work around. My current workaround is the read the registry settings directly from the HKCU\\Software\\Microsoft\\windows\\currentversion \\internet settings key.
Thanks,
Sam
--
_______________________________
Sam Santiago
ss*******@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"Sam Santiago" <ss*******@n0spam-SoftiTechture.com> wrote in message news:e1**************@TK2MSFTNGP10.phx.gbl...
Can anyone provide some guidance, example, and/or links for configuring a client behind an authenticated proxy to access a web service via the Internet?

Thanks,

Sam

--
_______________________________
Sam Santiago
ss*******@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
Nov 23 '05 #4
Jim
For some reason this is not working for me, I keep getting 407.

System.Net.IWebProxy proxyObject = new System.Net.WebProxy(proxyUrl,
false, null);

System.Net.NetworkCredential cred = new System.Net.NetworkCredential();
cred.UserName = @"domain\\uname";
cred.Password = "pass";
CredentialCache cc = new CredentialCache();
cc.Add(new Uri("http://192.168.1.100"), "NTLM", cred);
cc.Add(new Uri("http://192.168.1.100"), "Digest", cred);
cc.Add(new Uri("http://192.168.1.100"), "Basic", cred);
proxyObject.Credentials = cc;
theWS.Proxy = proxyObject;
theWS.PreAuthenticate = true;

but this gives me a 407 error. Any ideas?

Sam Santiago wrote:
Can anyone provide some guidance, example, and/or links for configuring
a client behind an authenticated proxy to access a web service via the
Internet?

Thanks,

Sam

--
_______________________________
Sam Santiago
ss*******@n0spam-SoftiTechture.com
<mailto:ss*******@n0spam-SoftiTechture.com>
http://www.SoftiTechture.com
_______________________________

Nov 23 '05 #5

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

Similar topics

2
by: Daniel Santana | last post by:
Hi, about Java WebServices, accessed by C#, I have two questions: 1) what I have to do, in order to use java webservices? 2) I search and I guess I must type the wsdl path in "add web reference"....
6
by: Joseph Geretz | last post by:
I recently upgraded my server to Windows 2003. The first thing I noticed is that my sample WebService pages no longer worked. The Invoke test button is missing. This is addresed by the following KB...
2
by: news.microsoft.com | last post by:
I have been looking around at the documentation and have come across a lot about how to create webservices and consume them. I have a fairly large 3 tier application with a ton of classes in c#...
2
by: M.Posseth | last post by:
scenario : I had a remoting server , now this remoting server needed the ability to comunicate with a Delphi 5 client, so i got the advise to switch to webservices now i rebuilded the...
2
by: sameer | last post by:
hi all, Description of my .net application: Desktop application using webservices over the internet to communicate with the sql server2000 database which is sitting behind the webserver. Done...
0
by: sameer | last post by:
hi all, Description of my .net application: Desktop application using webservices over the internet to communicate with the sql server2000 database which is sitting behind the webserver. Done...
6
by: sameer | last post by:
..NET Framework 1.1 VS2003 Application is making webservice calls from behind a proxy server and then freezes and dies. Questoin is can i use webservice over proxy server( i guess another name...
0
by: ndskim | last post by:
Currently I have the Web Services Proxy code generated by the WSDL.Exe command line. My Web app consists of ASP.NET in VB 2005 version. Here is what I have in the sample code: ' Set Proxy...
1
by: tommurray | last post by:
Hi I have a problem with one of our service providers website uses windows integrated authentication. I have searched through the internet and all I can see for solutions to this problem is get a...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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
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...

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.