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 / March 2005

Tip: Looking for answers? Try searching our database.

The request failed with HTTP status 502: Proxy Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sebastián::PJ - 15 Mar 2005 15:35 GMT
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

Signature

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

Manohar Kamath - 15 Mar 2005 17:30 GMT
You will need to set the Proxy property of the web service proxy class. More
at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemnetwebproxyclasstopic.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.

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

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

Signature

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

Sebasti?n::PJ - 15 Mar 2005 21:00 GMT
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

Signature

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

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemnetwebproxyclasstopic.asp


> Essentially:
>
[quoted text clipped - 13 lines]
>
> TIA
Manohar Kamath - 15 Mar 2005 21:27 GMT
Try the proxy serevr name with the protocol.

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

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

> Hey Manohar, thanks for your quick answer...
> I changed my coded and I'll paste it here...
[quoted text clipped - 19 lines]
> More
> > at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemnetwebproxyclasstopic.asp


> > Essentially:
> >
[quoted text clipped - 14 lines]
> >
> > TIA
Sebasti?n::PJ - 16 Mar 2005 14:59 GMT
Still got the same error...

Signature

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

> Try the proxy serevr name with the protocol.
>
[quoted text clipped - 23 lines]
> > More
> > > at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemnetwebproxyclasstopic.asp


> > > Essentially:
> > >
[quoted text clipped - 15 lines]
> > >
> > > TIA

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.