以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  ftp 下载时出错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=79452)

--  作者:happyft
--  发布时间:2015/12/31 23:38:00
--  ftp 下载时出错
ftp下载时出现“进入PASV模式失败, 451 Another Command is Courrently Pending ,Please try again later"

代码如下:端口映射测试等都正常。
Dim ftp1 As New FtpClient
ftp1.Host= ftp_Host
ftp1.Account = ftp_User
ftp1.Password = ftp_Pwd
ftp1.Port = ftp_Port  \'ftp端口号
ftp1.RootDir = "\\Update"
If ftp1.Connected = False Then \'如果FTP没有连接
    If ftp1.Connect Then \'连接FTP
        ftp1.OpenManager() \'如果连接成功,打开FTP客户端
    Else
        Messagebox.show("连接FTP失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    End If
End If

是什么原因造成的?要怎么解决。
谢谢!

--  作者:大红袍
--  发布时间:2016/1/3 23:26:00
--  

直接执行download的代码,是否也报错?

 

Dim ftp1 As new ftpclient
ftp1.host=
"196.128.143.28"
ftp1.Account =
"foxuser"
ftp1.password =
"138238110"
If
ftp1.Download("\\photo\\Desert.jpg","c:\\data\\Desert.jpg") = True Then
   
Messagebox.show("下载完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
   
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If