I have a C# terminal application that I've been running on my personal development pc so far. The application makes use of FTP to retrieve some files. For simple downloads of specific files through FTP I just make use of a regular System.Net.WebClient and fill out NetworkCredentials with username and password, but the application also makes use of FluentFTP for some of the more intricate FTP uploads needed.
This is basically how I connect using FluentFTP:
using (FtpClient ftp = new FtpClient(FTP_URL)
{
ftp.Credentials = new NetworkCredential(USER, PASSWORD);
ftp.Connect(); //Or run any ftp command...
}
When I run the terminal program on a windows 2019 server, and it tries to connect using FluentFTP, it stops the connection suddenly with a FluentFTP.FTPCommandException
and no other information written in the Exception stack. I tried logging the FTP-trace and this is what I got:
It seems to suddenly cut out without an error code.
I've tested it on my local development machine and it works here:
I tried to look if it was something related to login or similar, but when the login credentials are wrong, this is the result. It comes with a 530 Response:
I thought about firewall and port problems on the server as well, but what baffles me is that the simple downloading via FTP through System.Net.WebClient seems to work fine on the server.
If there's anyone who has any ideas how I might tackle this roadblock then I'd very much appreciate the help!
EDIT
I've copied out the properties of the FtpClient when running on the server and the local pc, and it seems like there are some differences :
Local pc
Capabilities=SIZE, MDTM
HashAlgorithms=NONE
EncryptionMode=None
DataConnectionEncryption=True
PlainTextEncryption=False
SslProtocols=Default
SystemType=Windows_NT
ServerType=Unknown
ServerOS=Windows
Windows server
Capabilities=NONE
HashAlgorithms=NONE
EncryptionMode=None
DataConnectionEncryption=True
PlainTextEncryption=False
SslProtocols=Default
SystemType=UNKNOWN
ServerType=Unknown
ServerOS=Unknown