Autor Beitrag
DorJo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 139



BeitragVerfasst: Di 26.01.10 11:45 
Hy @ all,
ich hab mal wieder ne Frage! Wir sitzen auf Arbeit hinter einem Proxy. Ich wollte über idhttp.post Daten an ein Script im Internet senden und habe dazu eigentlich alles mitgegeben was ich brauche:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.IdHTTP1Authorization(Sender: TObject;
  Authentication: TIdAuthentication; var Handled: Boolean);
begin
 IdHttp1.ProxyParams.ProxyUsername:=Benutzername eines Users;
 IdHttp1.ProxyParams.ProxyPassword:=Passwort;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
IdHttp1.ProxyParams.ProxyServer:=adresse vom Proxy;
IdHttp1.ProxyParams.ProxyPort:=Port;
IdHttp1.ProxyParams.BasicAuthentication:=true;
IdHttp1.Connect;
memo1.lines.add(idhttp1.Post(Adresse des Skriptes, Parameter));
end;


Allerdings kommt da folgende Fehlermeldung:
ausblenden Quelltext
1:
[...] Exception der Klasse EIdHTTPProtocolException aufgetreten. Meldung: 'HTTP/1.0 407 Proxy Authentication Required'.					

Habt ihr einen Tipp? Ich danke schonmal im Voraus!

MfG

DorJo
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Di 26.01.10 11:59 
Wenn du Benutzername und Passwort testweise im OnCreate setzt, statt im OnAuthorization?
Oder setz da nen Haltepunkt, ob er da durch kommt, bevor der Fehler auftritt

_________________
PROGRAMMER: A device for converting coffee into software.