Autor Beitrag
adler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Di 06.04.04 19:12 
Hi!

Ein Freund von mir will ein FTP Server proggen... für was auch immer *g* ^^
Folgender Fehler, er kann ihn starten, aber wenn ein Client verbindet gibts im Titel genannten Fehler.
Ich denke mal das liegt daran, das kein vorgegebenes Verzeichnis vorhanden ist?!
Jedenfalls, hat er in der Suche gesucht, ich habe auch nochmal geguckt, habe ihm nen Code gegeben, da treten aber Fehler auf.
Jetzt kann ers nichtmal kompilieren...

Antwort wäre gut!

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 06.04.04 19:40 
adler hat folgendes geschrieben:
Antwort wäre gut!

genutzte Komponente wäre gut :mrgreen:
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Di 06.04.04 19:46 
Natürlich Indy... ;)
idFTPServer

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
MAlsleben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 303

W2k,WinXP
D3 - DXE3 Enterprise
BeitragVerfasst: Mi 07.04.04 07:00 
Hi,

ein bischen Code wäre auch gut. Woran sollen wir denn sonst erkennen, wo es evntl. hängt.

Gruß Micha.

_________________
Viele Wege führen nach Rom.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Mi 07.04.04 11:50 
ausblenden volle Höhe 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:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, IdBaseComponent, IdComponent, IdTCPServer, IdFTPServer, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    IdFTPServer1: TIdFTPServer;
    procedure IdFTPServer1UserLogin(ASender: TIdFTPServerThread;
      const AUsername, APassword: String; var AAuthenticated: Boolean);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.IdFTPServer1UserLogin(ASender: TIdFTPServerThread;
  const AUsername, APassword: String; var AAuthenticated: Boolean);
begin
  AAuthenticated := ( AUsername = 'user' ) and ( APassword = 'pass' ) ;
  if not AAuthenticated then
    exit;
  ASender.HomeDir := 'C:\';
  asender.currentdir := 'C:\';
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  IdFTPServer1.active := true; // an
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  IdFTPServer1.active := false; // aus
end;

end.


Dann wurde schon das mit dem OnListDirectory da versucht.
Da gabs nur Fehler...

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.