delphi2007 教程

delphi2007 教程

首页 新随笔 联系 聚合 管理
  1013 Posts :: 0 Stories :: 28 Comments :: 0 Trackbacks
郁闷N天了,IDFTP发生10054错误后无法继续上传文件,重新创建IDFTP后发生错误:550 cannot create file。请教解决方法 Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiNetwork/html/delphi_20061201111110220.html
如题。

服务器认为文件还没传完,那就锁定了  
  等数分钟,服务器超时后才能恢复!  
   
  所以,你得保证传输尽可能别突然断线

为什么重启程序后又能正常传输?

我测试了下(服务器为Serv-U,Win2K)  
  重启Serv-U,不重启程序不能传输;但重启我的程序,不重启Serv-U可以传输。why?

已解决。  
  Indy升级到Indy9,  
  IDFTP单元中的InternalGet函数引去如下语句,同样处理InternalPut;  
      //   ToDo:   Change   that   to   properly   handle   response   code   (not   just   success   or   except)  
      //   226   =   download   successful,   225   =   Abort   successful}  
  //     LResponse   :=   GetResponse([225,   226,   250,   426,   450]);          
  //     if   (LResponse   =   426)   or   (LResponse   =   450)   then   begin  
  //         GetResponse([226,   225]);  
  //         DoStatus(ftpAborted,   [RSFTPStatusAbortTransfer]);  
  //     end;

但重启我的程序,不重启Serv-U可以传输。why?  
   
  因为你的本地文件是以独占模式打开的。

posted on 2009-03-02 11:33 delphi2007 阅读(1231) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。