다음을 통해 공유


Commands Supported by FtpWebRequest and IIS FTP

Server Side Commands

FTP 7.5 accepts the following FTP commands.

214-The following commands are recognized (* ==>'s unimplemented).
    ABOR
    ACCT
    ADAT *
    ALLO
    APPE
    AUTH
    CCC
    CDUP
    CWD
    DELE
    ENC *
    EPRT
    EPSV
    FEAT
    HELP
    HOST
    LANG
    LIST
    MDTM
    MIC *
    MKD
    MODE
    NLST
    NOOP
    OPTS
    PASS
    PASV
    PBSZ
    PORT
    PROT
    PWD
    QUIT
    REIN
    REST
    RETR
    RMD
    RNFR
    RNTO
    SITE
    SIZE
    SMNT
    STAT
    STOR
    STOU
    STRU
    SYST
    TYPE
    USER
    XCUP
    XCWD
    XMKD
    XPWD
    XRMD
214 HELP command successful.

FTP shipped for IIS 6 supports a shorter list of commands,

214-The following  commands are recognized(* ==>'s unimplemented).
   ABOR
   ACCT
   ALLO
   APPE
   CDUP
   CWD
   DELE
   FEAT
   HELP
   LIST
   MDTM
   MKD
   MODE
   NLST
   NOOP
   OPTS
   PASS
   PASV
   PORT
   PWD
   QUIT
   REIN
   REST
   RETR
   RMD
   RNFR
   RNTO
   SITE
   SIZE
   SMNT
   STAT
   STOR
   STOU
   STRU
   SYST
   TYPE
   USER
   XCUP
   XCWD
   XMKD
   XPWD
   XRMD
214  HELP command successful.

Client Side Commands

FtpWebRequest.Method accepts the following commands based on WebRequestMethods.Ftp documentation.

RETR  
NLST  
LIST  
STOR  
STOU  
APPE  
DELE  
MDTM  
SIZE  
RENAME
MKD   
RMD   
PWD   

(in fact if you use FtpWebRequest/FtpWebResponse to develop an FTP application, you will see other commands from the conversation. That’s because they are embedded in the underlying code).

How To Check Which Command Supported By Server

To see what commands are supported by an FTP server, you can

  1. Open a command prompt.
  2. Type “ftp server_name” to launch ftp utility shipped with Windows.
  3. Log in by providing user name and password.
  4. Type “remotehelp” in ftp context.

Actually when we use remotehelp here, ftp utility translates that to a HELP command and send to the server.

You can try to use “literal HELP” in ftp context. Of course, the same information is printed out.

FTPS Support

FTP 7.5 introduces full support to FTP over SSL (FTPS). However, FtpWebRequest class available in .NET Framework does not (though it covers some scenarios).

If you need to develop a full FTPS capable client software with .NET, I suggest you visit this open source project.