Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WebException when accessing webservice via proxy

Reply
Thread Tools

WebException when accessing webservice via proxy

 
 
Greg
Guest
Posts: n/a
 
      03-15-2006
Hi all,

When I call web service via a proxy I get a Web exception saying this:

<HTML><HEAD><TITLE>Found</TITLE></HEAD><BODY><H1>Found</H1>
This document has moved to a new location:



http://MappedServer/VirtualFolder/SomeWebService.asmx



Please update your documents and hotlists accordingly.</BODY></HTML>


the code I'm using is this:

myWebService ws= new myWebService();
ws.Url = "http://MappedServer/VirtualFolder/SomeWebService.asmx";
ws.Proxy = new WebProxy("proxyServer", 8081);
ws.Method1();

In the proxyServer machine I have a URL mapping that translates
http://MappedServer to http://WebServiceServer .

If I do a similar test with Internet Explorer it works fine. For example if
I put the proxy settings into IE and ask for the WSDL (type into the address
bar http://MappedServer/VirtualFolder/So...vice.asmx?WSDL) it works
fine.

Any ideas please?

Thanks in advanced,
Greg.


 
Reply With Quote
 
 
 
 
Javier G. Lozano
Guest
Posts: n/a
 
      03-16-2006
I'm not sure if the proxy's request is capable of following the
redirect. What I'm guessing is that IE gets a redirect request and
handles it for you. Try connecting directly to the WEbServiceServer
and see if it works.

Why are you trying to redirect the request?

 
Reply With Quote
 
 
 
 
Greg
Guest
Posts: n/a
 
      03-16-2006
Hi Javier,

> I'm not sure if the proxy's request is capable of following the
> redirect. What I'm guessing is that IE gets a redirect request and
> handles it for you. Try connecting directly to the WEbServiceServer
> and see if it works.


If the seetup the proxy correctly it will work. But this is not the senario
I'm iterested in.

> Why are you trying to redirect the request?


Our software should be able to handle this senario. We've got customers that
set up their proxies with mapped URLs.

Many thanks,
Greg.


 
Reply With Quote
 
CaffieneRush@gmail.com
Guest
Posts: n/a
 
      03-17-2006
Hi,

The bottom of this article anticipates your scenario.
http://msdn.microsoft.com/library/de...ce08062002.asp

Good Luck.

 
Reply With Quote
 
Greg
Guest
Posts: n/a
 
      03-17-2006
Hi,

What the article describes breflly is the fact that we can trap the
exception and re-issue a new request to the new location.

This wouldn't work for 2 reasons:

1. Only the proxy server can access machines outside the firewall. So
re-issuing a new request to the machine outside the firewall wouldn't work.

2. The new location returned by HttpResponse.Headers["Location"] as
described in the article still points to the original location. So, there is
no way of getting the new location.

Many thanks,
Greg.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Certificate issue with WCF client accessing webservice via broker Ryan ASP .Net Web Services 0 10-09-2007 05:21 PM
Accessing a .NET Webservice via JavaScript AlBruAn ASP .Net Web Services 1 08-17-2007 06:48 PM
Call WebService over https via proxy... koraykazgan Software 0 08-16-2007 03:20 PM
Problem accessing WebService through Proxy Server Dermot O'Loughlin ASP .Net Web Services 4 12-02-2004 08:34 PM
System.Net.WebException when calling a webservice atip ASP .Net Web Services 15 06-24-2004 09:22 AM



Advertisments