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 / November 2006

Tip: Looking for answers? Try searching our database.

consuming webservice trough proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boni - 20 Nov 2006 12:43 GMT
I want consuming a webserivce trough a proxy. I use this code.
myService s = new myService ();

System.Net.WebProxy proxyObject = new
System.Net.WebProxy("http://proxyhost:8080");
s.Proxy = proxyObject;

It doesn't works, it returns a error
HTTP 407: Proxy Authentication Required ( Access is denied. ).
But my proxy don't need a user Authentication.

The same code used with another object ( WebClient ) works good!

System.Net.WebClient wc = new System.Net.WebClient();
System.Net.WebProxy proxyObject = new
System.Net.WebProxy("http://proxyhost:8080");
wc.Proxy = proxyObject;
string test = wc.DownloadString("http://www.mysite.com");

Someone can help me?
thank you very mutch.
Boni
Claus Konrad [MCSD] - 20 Nov 2006 21:21 GMT
It is the server who decides what is required to use it's services.
Hence, your proxy should obey to what the server states.

If using IIS as host, set allow anonymous access and verify that everything
works.

If so - introduce security by using WSE and sign the SOAP message itself.
This is preferred over point-to-point authentication.
Signature

rgds.
/Claus Konrad
MCSD.NET (C#)

> I want consuming a webserivce trough a proxy. I use this code.
> myService s = new myService ();
[quoted text clipped - 18 lines]
> thank you very mutch.
> Boni
Boni - 21 Nov 2006 08:27 GMT
Thank you for your answer, but I don't understand.
I have to pass trough a proxy to have a internet connection. The webservice
I want cosume it's outside my net.
So if I use my app to consume the same webservice on a PC with direct access
to internet I don't have problem, but I can't set the proxy on my client app
to have the same result on a PC behind a proxy.

You would say that the webservice webserver (IIS) recongnize that the call
came from a app behind a proxy instead with a direct connection so its answer
is different? And I have to change the permissions on my webserver?

best regards
Boni

> It is the server who decides what is required to use it's services.
> Hence, your proxy should obey to what the server states.
[quoted text clipped - 27 lines]
> > thank you very mutch.
> > Boni
Greg Shaw - 30 Nov 2006 10:26 GMT
Boni,
What Claus is saying is that if you can change your webservice host
so that it allows anonymous access you can check that everything
is working. If you get the same error (407) with the webservice host
set to anonymous then it is not your webservice host that has the
problem. This is just for verification.

Cheers, Greg.

> Thank you for your answer, but I don't understand. I have to pass trough a
> proxy to have a internet connection. The webservice I want cosume it's
[quoted text clipped - 43 lines]
>> > thank you very mutch.
>> > Boni

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.