🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1036

Re: Proxy server

#1036
From: Holger Wiebrock
Date: Wed, 30 May 2007 14:28
80 lines
3701 bytes
Hi Remy

thank you for your answer.

First of all it is a http proxyserver which my customer is using and it is 
still not working.

Today i checked again the credentials and they are correct.

--> My .Net Code:
            try
            {
                NetworkCredential creds = new NetworkCredential("username", 
"password");
                WebRequest req = WebRequest.Create("some url");
                req.Proxy = new WebProxy("server:port");
                req.Proxy.Credentials = creds;
                StreamReader responseReader = new 
StreamReader(req.GetResponse().GetResponseStream());
                Console.WriteLine(responseReader.ReadToEnd());
                responseReader.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

My Steps today:

1. Get the latest version 9 Snapshot from indy website.
2. Set hoInProcessAuth
3. After settting ProxyParams.BasicAuthentication "true" i do not get any 
violation errors anymore.
4. Set AuthEntries = 5 although default value 3 supposed to be work.
5. After all now i use OnProxyAuthorization to set the username, password 
and "handled=true"

I still get the error 407.

Greetings Holger

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im Newsbeitrag 
news:465c60b9$1@newsgroups.borland.com...
>
> "Holger Wiebrock" <hw@medata.de> wrote in message
> news:465c26d6@newsgroups.borland.com...
>
>> One of our customers uses a proxyserver and i try to setup a
> connection.
>
> You did not say what kind of proxy is being using.  It makes a
> difference, as there are two different ways to approach it.  What you
> have attempted so far only applies to proxies that are specific to the
> HTTP protocol.  General TCP proxies, such as a SOCKS server, requires
> the use of a separate component, such as TIdSocksInfo, that is to be
> attached to the TIdHTTP component via IOHandler.SocksInfo property.
>
>> AnsiString response = http->Get(some url);
>>
>> Here i get an error 407 proxy authentication required.
>
> Double-check that your proxy username/password are actually correct.
> In Indy 9, TIdHTTP also has OnSelectProxyAuthorization and
> OnProxyAuthorization events that deal with proxy connections.  And
> make sure that the AuthRetries property is set to a reasonable number,
> and that you have hoInProcessAuth set in the Options property.
>
>> I wrote a testapplication with c# to check the right username and
> password .
>> With .Net i got it to work, so the username and password which i got
> from
>> the admin is correct and the error by indy makes for me no sense at
> all.
>
> Please show the .NET code that works for you.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <465d88d1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <465c26d6@newsgroups.borland.com> <465c60b9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,1522b891fa1936bb
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Holger Wiebrock" <hw@medata.de>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <465c26d6@newsgroups.borland.com> <465c60b9$1@newsgroups.borland.com>
Subject: Re: Proxy server
Date: Wed, 30 May 2007 16:28:04 +0200
Lines: 82
Organization: MeData EDV Systeme Gmbh
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.100.248.235
Message-ID: <465d88d1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1180534993 82.100.248.235 (30 May 2007 07:23:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail