407:Proxy authentication error while try to access Web Service published on internet

  • Thread starter Nuzhat Parveen via .NET 247
  • Start date
N

Nuzhat Parveen via .NET 247

Hi,
I wanted to consume a webservice(http://www.webservicex.com/CurrencyConvertor.asmx) published onInternet and i am behind proxy server and I try to add in myapplication as it gives the 407:proxy authentication error. Ipassed network credential also. I created Proxy class and addedin my project reference also. Is there anybody to help?
 
T

Tomas Restrepo \(MVP\)

Does the proxy you're using require authentication?
Remember that you deal with two possible sets of credentials here... those
attached directly to the webservice client are used to access the
webservice, while you can have a second set of credentials attached to the
HTTP Proxy object that are used for authentication against the actual proxy
server on your network...

--
Tomas Restrepo
(e-mail address removed)

Hi,
I wanted to consume a webservice
(http://www.webservicex.com/CurrencyConvertor.asmx) published on Internet
and i am behind proxy server and I try to add in my application as it gives
the 407:proxy authentication error. I passed network credential also. I
created Proxy class and added in my project reference also. Is there anybody
to help?
 
D

Durgaprasad Gorti[MSFT]

Proxy Servers can demand authentication just like web servers do.
When you are on an Intranet environment, IE takes care of sending
your current credentials so you don;t see this in action unless you use a
netmon.

1) If you want to specify credentials to a proxy server, do the following
If you want to use the same settings as IE does
WebProxy wp = GlobalProxySelection.Select as WebProxy;
wp.Credentials = CredentialCache.DefaultCredentials;

or
If you have your own custom proxy that is different from IE
WebProxy wp = new WebProxy(....)
wp.Credentials = CredentialCache.DefaultCredentials;

2) If you want to set credentials to a server

HttpWebRequest .hr = ...
hr.Credentials = CredentialCache.DefaultCredentials;

Durgaprasad Gorti
Microsoft
----------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
--------------



--------------------
|From: "Tomas Restrepo \(MVP\)" <[email protected]>
|References: <e4#[email protected]>
|Subject: Re: 407:proxy authentication error while try to access Web
Service published on internet
|Date: Sun, 4 Jul 2004 12:11:46 -0500
|Lines: 30
|X-Priority: 3
|X-MSMail-Priority: Normal
|X-Newsreader: Microsoft Outlook Express 6.00.3790.0
|X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.132
|Message-ID: <#41G#[email protected]>
|Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
|NNTP-Posting-Host: 200.116.19.42
|Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
..phx.gbl
|Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:24416
|X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
|Does the proxy you're using require authentication?
|Remember that you deal with two possible sets of credentials here... those
|attached directly to the webservice client are used to access the
|webservice, while you can have a second set of credentials attached to the
|HTTP Proxy object that are used for authentication against the actual proxy
|server on your network...
|
|--
|Tomas Restrepo
|[email protected]
|
||Hi,
|I wanted to consume a webservice
|(http://www.webservicex.com/CurrencyConvertor.asmx) published on Internet
|and i am behind proxy server and I try to add in my application as it gives
|the 407:proxy authentication error. I passed network credential also. I
|created Proxy class and added in my project reference also. Is there
anybody
|to help?
|
|--------------------------------
|From: Nuzhat Parveen
|
|-----------------------
|Posted by a user from .NET 247 (http://www.dotnet247.com/)
|
|<Id>GfW+kmP4JUy1ZjH7qgv6WA==</Id>
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top