Entwickler-Ecke

Internet / Netzwerk - Strange Error


Soulama - Mo 16.10.06 14:10
Titel: Strange Error
Hallo,
ich versuche eine FTP Verbindung aufzubauen.
Mein Code:

Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
function FtpAccess.ConnectToSFTPServer(User, Passwd, Host, Port: String): boolean;
begin
  Result:= False ;
  SSL:= TIdSSLIOHandlerSocketOpenSSL.Create(FTP);
  SSL.ReadTimeout := 60000;
  SSL.SSLOptions.Method := sslvSSLv23;
  SSL.SSLOptions.Mode := sslmClient;
  FTP:= TIdFTP.Create(nil);
  http://FTP.AutoLogin:= True;
  http://FTP.IOHandler := SSL ;
  http://FTP.AutoLogin := True;
  http://FTP.Passive := True;
  http://FTP.UseTLS := utUseExplicitTLS;
  http://FTP.AUTHCmd := tAuthSSL;
  http://FTP.DataPortProtection:= ftpdpsPrivate ;
  http://FTP.Username:= USER;
  http://FTP.Password:= Passwd;
  http://FTP.Host:= HOST;
  http://FTP.Port:= StrToInt(Port) ;
  http://FTP.Disconnect ;
  Try
    http://FTP.Connect ;
    Result:= True ;
  Except on E:Exception do
    Begin
      MyDataModule.AddToFtpLog('ERROR Func ConnectToSFTPServer', E.Message);
      MyDataModule.Log('ERROR Func ConnectToSFTPServer', E.Message);
    end ;
  End ;
end;

Bekomme ich aber diesen Fehler: ERROR Func ConnectToSFTPServer, Fehler bei Bereichsprüfung.
Muss gestehen dass ich nicht weiss welche bereiche geprüft werden ????
Jede Idee ist willkomen,
Danke


LexXis - Mo 16.10.06 14:28

Ich hab da jetzt auch nicht wirklich ahnung von, aber könnte es dran liegen, dass Du "FTP" schon in Zeile 4 verwendest, ob wohl Du das Ding erst in Zeile 8 erstellst?

Nen Versuch war´s wert =)

Gruß LexXis


Soulama - Mo 16.10.06 14:56

Gut gesehen, aber leider hat damit nichts zu tun. :(
Zur Info Teste der code unter Win98 SE, die selbe function fonctioniert einwandfrei unter XP. :roll:


Platon - Mo 16.10.06 17:00

Was für nen Port verwendest du ?


Soulama - Di 17.10.06 08:54

Zitat:
Was für nen Port verwendest du ?

2121


Platon - Mi 18.10.06 11:35

Tja kann ich jetzt auch nicht sagen....
Versuch mal Haltepunkt auf "http://FTP.Connect ;" und dann debuggen... :|


Soulama - Fr 20.10.06 16:15

Problem gelöst,
ich musste die Quellen von indy neu kompilieren.
thats all,

Greetz,
Soulman