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