开发者

Active/Passive FTP Transfer using FTPWebrequestclass

I am transferring files using FtpWebRequest class in C#; in that class there is a property

ftpobject.usePassive = 开发者_高级运维true (or) false;

I meant it as

  • if use passive is false then it is "Active"
  • if use Passive is true then it is "Passive"

what i meant above is right or wrong?


Yes, you're right. From MSDN:

false if the client application's data transfer process listens for a connection on the data port; otherwise, true if the client should initiate a connection on the data port. The default value is true.

...and...

Setting the UsePassive property to true sends the "PASV" command to the server. This command requests the server to listen on a data port and to wait for a connection rather than initiate one upon receipt of a transfer command.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜