hello.
I hope my case helps you.
For reference, some servers may respond too late for uploads.
So, if the client closes the data channel before the server cleans the upload data, you may be getting a 450 error. (especially IIS)
So after uploading to ftp stream, after doing ftpstream.Flush()
Execute the code below:
using (var ftpStream = ftp.GetUploadStream(filename))
{
// todo upload
ftpStream.Flush();
}
for (int r = 0; r < 30; r++)
{
if (ftp.State == FtpState.Ready)
{
break;
}
Thread.Sleep(10);
DEBUGLOG($"UPLOAD FTP STATE : {ftp.State}");
}
Or, after flushing, it might be a good idea to give it some time.