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

From: Durgaprasad Gorti[MSFT] (dgorti_at_online.microsoft.com)
Date: 07/05/04

  • Next message: Durgaprasad Gorti[MSFT]: "RE: ASP.Net calling SSL Web Service (PayPal) fails: "Could not establish secure channel for SSL/TLS""
    Date: Mon, 05 Jul 2004 23:38:51 GMT
    
    

    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\)" <tomasr@mvps.org>
    |References: <e4#JwmYYEHA.3476@tk2msftngp13.phx.gbl>
    |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#neYEHA.2408@tk2msftngp13.phx.gbl>
    |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
    |tomasr@mvps.org
    |
    |"Nuzhat Parveen via .NET 247" <anonymous@dotnet247.com> wrote in message
    |news:e4#JwmYYEHA.3476@tk2msftngp13.phx.gbl...
    |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>
    |
    |
    |


  • Next message: Durgaprasad Gorti[MSFT]: "RE: ASP.Net calling SSL Web Service (PayPal) fails: "Could not establish secure channel for SSL/TLS""

    Relevant Pages

    • Re: IIS Authentication Methods
      ... For example, many corporations have proxy servers set up, so> employees coming from those corporations will have to pass through a proxy> server to get to your IIS server. ... If the corporation's proxy server doesn't> support NTLM, those employees won't be able to authenticate. ... >> Subject: Re: IIS Authentication Methods ... When Netscape receives the list of>>> supported authentication mechanisms, it will realize that it doesn't ...
      (microsoft.public.inetserver.iis.security)
    • Re: NetworkCredentials & Authentication Modules for WebProxy consumption
      ... I have also found that it is sometimes necessary to specify the credentials ... for the proxy server on the HttpWebRequest object. ... There is a free Proxy server called Proxy+. ... With this server, if you require authentication, you have to put the ...
      (microsoft.public.dotnet.framework.compactframework)
    • Re: httpwebrequest with https behind proxy with authentication
      ... Our proxy server uses NTLM authentication and as you suggested I modified the code as follows: ... I still receive "The remote server returned an error: Proxy Authentication Required." ... and it works if I use http instead of https or if I disable authentication on the proxy ...
      (microsoft.public.dotnet.framework)
    • Re: NetworkCredentials & Authentication Modules for WebProxy consumption
      ... choice is MS ISA 2000 and all my testing are based on this product. ... following the 'trick' of assigning the credentials to the ... However in my experience this only works if the authentication method ... required by the proxy is 'Basic' and only 'Basic'. ...
      (microsoft.public.dotnet.framework.compactframework)
    • RE: [fw-wiz] NTLM authentication from DMZ
      ... and a simple reverse proxy that can also act as SSL ... Unless you're handing out client-side certs (and we've had the SSL ... authentication is going to be username/password for your user's accounts. ... not only of the user's e-mail, but of their credentials. ...
      (Firewall-Wizards)

    Loading