1
Vote

OpenWrite throws exception with "not a plain file"

description

FtpClient.OpenWrite throws a FtpCommandException with {"/home/SDK/HmiStartup: not a plain file."} after uploading a few files. So for a few files before it works.

It works well with System.Net.FtpClient 1.0.5281.14359 but with newer versions it does not work.

FTP server is on a QNX device

I use:
client = new FtpClient();
client.Host = host;
client.DataConnectionType = FtpDataConnectionType.PASV;
client.EnableThreadSafeDataConnections = false;  // essential for QNX server
client.Credentials = new NetworkCredential(login, password);
client.Connect();

client.OpenWrite({"/home/SDK/HmiStartup", FtpDataType.Binary));  // failed
StackTrace from System.Net.FtpClient 1.0.5824.34026:
at System.Net.FtpClient.FtpClient.OpenPassiveDataStream(FtpDataConnectionType type, String command, Int64 restart) in D:\Projects\Tools\CentralStation\System.Net.FtpClient\FtpClient.cs:line 1102
   at System.Net.FtpClient.FtpClient.OpenDataStream(String command, Int64 restart) in D:\Projects\Tools\CentralStation\System.Net.FtpClient\FtpClient.cs:line 1290
   at System.Net.FtpClient.FtpClient.OpenWrite(String path, FtpDataType type) in D:\Projects\Tools\CentralStation\System.Net.FtpClient\FtpClient.cs:line 1525

comments