Ver Mensaje Individual
  #1  
Antiguo 30-06-2011
NEG1414 NEG1414 is offline
Miembro
 
Registrado: mar 2007
Posts: 177
Reputación: 20
NEG1414 Va por buen camino
Problemas bajar archivo (Ftp)

Buenas

Estoy usando el Componente TIdFTP (Indy9) para desecargar un archivo (1k) mediante FTP de la siguiente manera


Código:
  AnsiString PathApp  = ExtractFilePath(Application->ExeName);

  if(!Ftp->Connected())
   {
     Ftp->Host     = "ftp.Miserver.es";
     Ftp->Username = "[email protected]";
     Ftp->Password = "Mipase";
     try
     {
      //Conecto con servidor
      Ftp->Connect(true);
       try
        {

           AnsiString Destino = PathApp+ "123.txt";
           TFileStream *FStream; 
           FStream = new TFileStream(Destino,fmCreate);
           Ftp->Get("123.txt",FStream,false); 
       }

       ................
      .................
En principio no me da problemas al conectar (o eso creo) El problema surge cuando se realiza el evento Get del Componente... queda en "stand by" bastantes segundos y se produce el siguiente error

Socket error #10054 Connection reset by peer

Que hago mal Gracias
Responder Con Cita