I use the FtpWebRequest and FtpWebResponse objects in the System.Net namespace to issue a LIST command. The problem I am facing is that the FTP server I am connecting to does not have an OPTS command.
Is there a way to prevent the FtpWebRequest OPTS command from executing?
I'm afraid that you cannot do this ... According to Reflector, it seems to be hard-coded in the class's internal method ( FtpControlStream.BuildCommandsList), so you cannot override it. However, this should not be a problem, the request should continue even if the OPTS command does not work (see the code FtpControlStream.PipelineInstructionin the reflector)
FtpControlStream.BuildCommandsList
FtpControlStream.PipelineInstruction
, ... ftp- OPTS UTF8, UTF8. ( , "OPTs UTF8" FTP, UTF8 .) .NET Ftp , OK OPTS UTF8... , MS - UTF8 , , UTF8, .
, , FtpWebRequest:
FtpWebRequest
WriteCallbackDelegate
CommandStream
Commands
I wrote some details of the project on how to do this, but feel free to comment there / here or email me if anyone sees this and needs more details.
Source: https://habr.com/ru/post/1719756/More articles:how to get root node attribute value using linq - c #Managing other windows from a C # application - windowsActiveRecord lock "Failed to compile mapping document: (string)" - c #Можете ли вы дать несколько советов по настройке моей базы данных? - databaseHow to specify rubygems path in environment without Ruby script? - ruby | fooobar.comSUM Conditional Group in Crystal Reports - crystal-reportsJQuery UI Dialog + jQuery Validate + Tabbing - jquerySqlBulkCopy to a table with a composite primary key - c #Summation by groups and subgroups - crystal-reportsJMP - absolute address (op codes) - assemblyAll Articles