Gets or sets the command to send to the FTP server.
Assembly: System (in System.dll)
The property determines which command is sent to the server. You set the by using the strings defined in the public field members of the WebRequestMethods.Ftp class. Note that the strings defined in the WebRequestMethods.Ftp class are the only supported options for the property. Setting the property to any other value will result in an ArgumentException exception.
When setting to UploadFile, you must do so before calling the GetRequestStream method. Failure to call these members in the correct order causes a ProtocolViolationException exception when you attempt to get the request stream.
The credentials supplied for the FtpWebRequest object must have permission to perform the specified method. If not, the FTP command fails.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.