Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2005

Tip: Looking for answers? Try searching our database.

Webservices behind Authenticated Proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam Santiago - 01 Sep 2005 05:36 GMT
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

Signature

_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________

Stefan Misch - 01 Sep 2005 13:41 GMT
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

 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
 ssantiago@n0spam-SoftiTechture.com
 http://www.SoftiTechture.com
 _______________________________
Marvin Smit - 01 Sep 2005 13:54 GMT
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.

>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 - 01 Sep 2005 16:04 GMT
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

Signature

_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________

 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
 ssantiago@n0spam-SoftiTechture.com
 http://www.SoftiTechture.com
 _______________________________
Jim - 04 Oct 2005 02:57 GMT
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?

> Can anyone provide some guidance, example, and/or links for configuring  
> a client behind an authenticated proxy to access a web service via the
[quoted text clipped - 3 lines]
>
> Sam

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.