For Programmers: Free Programming Magazines  


Home > Archive > Microsoft Webservices > March 2005 > The request failed with HTTP status 502: Proxy Error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author The request failed with HTTP status 502: Proxy Error
Sebastián::PJ

2005-03-15, 4:02 pm

I'm trying to reach a web service outside my organization and this is what I get.
Where do I have to write the Proxy credentials?

TIA

--
Check my blog out at:
http://sgomez.blogspot.com
Manohar Kamath

2005-03-15, 4:02 pm

You will need to set the Proxy property of the web service proxy class. More
at:

http://msdn.microsoft.com/library/d...yclasstopic.asp

Essentially:

ProxyClass myProxy = new ProxyClass();
myProxy.Url = "your URL for web service";

myProxy.Proxy = new WebProxy("your proxy server:port", true);

// Set your credentials to the proxy server
myProxy.Proxy.Credentials = CredentialCache.DefaultCredentials;

Hope that helps.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


"Sebastián::PJ" <NOSPAM_sgomez@poderjudicial.gub.uy> wrote in message
news:%23BUv4uWKFHA.3788@tk2msftngp13.phx.gbl...
I'm trying to reach a web service outside my organization and this is what I
get.
Where do I have to write the Proxy credentials?

TIA

--
Check my blog out at:
http://sgomez.blogspot.com


Sebastián::PJ

2005-03-15, 9:01 pm

Hey Manohar, thanks for your quick answer...
I changed my coded and I'll paste it here...

Dim objWS As New MyWebService
objWS.Proxy = New WebProxy("PROXY:80", True)

Dim objCred As New NetworkCredential
objCred.UserName = "sgomez"
objCred.Password = "password"
objCred.Domain = "pjtest"

objWS.Proxy.Credentials = objCred

Dim strResult As String = objWS.HelloWorld()

MsgBox(strResult)

The thing is I still get the same error, what could it be???
Thanx

--
Check my blog out at:
http://sgomez.blogspot.com
"Manohar Kamath" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:urr2AxXKFHA.3916@TK2MSFTNGP14.phx.gbl...
> You will need to set the Proxy property of the web service proxy class.

More
> at:
>
>

http://msdn.microsoft.com/library/d...yclasstopic.asp
>
> Essentially:
>
> ProxyClass myProxy = new ProxyClass();
> myProxy.Url = "your URL for web service";
>
> myProxy.Proxy = new WebProxy("your proxy server:port", true);
>
> // Set your credentials to the proxy server
> myProxy.Proxy.Credentials = CredentialCache.DefaultCredentials;
>
> Hope that helps.
>
> --
> Manohar Kamath
> Editor, .netWire
> www.dotnetwire.com
>
>
> "Sebastián::PJ" <NOSPAM_sgomez@poderjudicial.gub.uy> wrote in message
> news:%23BUv4uWKFHA.3788@tk2msftngp13.phx.gbl...
> I'm trying to reach a web service outside my organization and this is what

I
> get.
> Where do I have to write the Proxy credentials?
>
> TIA
>
> --
> Check my blog out at:
> http://sgomez.blogspot.com
>
>



Manohar Kamath

2005-03-15, 9:01 pm

Try the proxy serevr name with the protocol.

New WebProxy(http://PROXY:80, true)

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


"Sebastián::PJ" <NOSPAM_sgomez@poderjudicial.gub.uy> wrote in message
news:%23CRHujZKFHA.572@tk2msftngp13.phx.gbl...
> Hey Manohar, thanks for your quick answer...
> I changed my coded and I'll paste it here...
>
> Dim objWS As New MyWebService
> objWS.Proxy = New WebProxy("PROXY:80", True)
>
> Dim objCred As New NetworkCredential
> objCred.UserName = "sgomez"
> objCred.Password = "password"
> objCred.Domain = "pjtest"
>
> objWS.Proxy.Credentials = objCred
>
> Dim strResult As String = objWS.HelloWorld()
>
> MsgBox(strResult)
>
> The thing is I still get the same error, what could it be???
> Thanx
>
> --
> Check my blog out at:
> http://sgomez.blogspot.com
> "Manohar Kamath" <mkamath@TAKETHISOUTkamath.com> wrote in message
> news:urr2AxXKFHA.3916@TK2MSFTNGP14.phx.gbl...
> More
>

http://msdn.microsoft.com/library/d...yclasstopic.asp
what[color=darkred]
> I
>
>



Sebastián::PJ

2005-03-16, 4:03 pm

Still got the same error...

--
Check my blog out at:
http://sgomez.blogspot.com
"Manohar Kamath" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:eaY011ZKFHA.3312@TK2MSFTNGP10.phx.gbl...
> Try the proxy serevr name with the protocol.
>
> New WebProxy(http://PROXY:80, true)
>
> --
> Manohar Kamath
> Editor, .netWire
> www.dotnetwire.com
>
>
> "Sebastián::PJ" <NOSPAM_sgomez@poderjudicial.gub.uy> wrote in message
> news:%23CRHujZKFHA.572@tk2msftngp13.phx.gbl...
class.[color=darkred]
>

http://msdn.microsoft.com/library/d...yclasstopic.asp
> what
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com