I’m using the FtpWebRequest and FtpWebResponse objects in the System.Net namespace to issue a LIST command. The problem I’m having is that the FTP server I’m connecting to does not have the OPTS command implemented.
Is there a way of preventing FtpWebRequest from issuing the OPTS command?
I’m afraid you can’t do that… According to Reflector, it seems to be hard-coded in an internal class method (
FtpControlStream.BuildCommandsList), so you can’t override it. However it shouldn’t be an issue, the request should continue even if the OPTS command fails (see the code forFtpControlStream.PipelineInstructionin Reflector)