Autor Beitrag
Soulama
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Mo 16.10.06 14:10 
Hallo,
ich versuche eine FTP Verbindung aufzubauen.
Mein Code:
ausblenden 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);
  FTP.AutoLogin:= True;
  FTP.IOHandler := SSL ;
  FTP.AutoLogin := True;
  FTP.Passive := True;
  FTP.UseTLS := utUseExplicitTLS;
  FTP.AUTHCmd := tAuthSSL;
  FTP.DataPortProtection:= ftpdpsPrivate ;
  FTP.Username:= USER;
  FTP.Password:= Passwd;
  FTP.Host:= HOST;
  FTP.Port:= StrToInt(Port) ;
  FTP.Disconnect ;
  Try
    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
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 170
Erhaltene Danke: 3



BeitragVerfasst: 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 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: 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
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WinXP, Windows 7
Delphi 5 Enterprise, Delphi 2005 Architect, Delphi 2007 Prof., Delphi 2010 Prof., Delphi XE2 Prof., Visual C++ 6.0, LabView 7.1, SPS
BeitragVerfasst: Mo 16.10.06 17:00 
Was für nen Port verwendest du ?
Soulama Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Di 17.10.06 08:54 
Zitat:
Was für nen Port verwendest du ?

2121
Platon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WinXP, Windows 7
Delphi 5 Enterprise, Delphi 2005 Architect, Delphi 2007 Prof., Delphi 2010 Prof., Delphi XE2 Prof., Visual C++ 6.0, LabView 7.1, SPS
BeitragVerfasst: Mi 18.10.06 11:35 
Tja kann ich jetzt auch nicht sagen....
Versuch mal Haltepunkt auf "FTP.Connect ;" und dann debuggen... :|
Soulama Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Fr 20.10.06 16:15 
Problem gelöst,
ich musste die Quellen von indy neu kompilieren.
thats all,

Greetz,
Soulman