Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
–1 vote
1.2k views
in .NET FTP by (160 points)
recategorized by

Using SecureFTPConnection , setting

ftp.CommandEncoding = Encoding.UTF8;
ftp.AutoFeatures = true;

This works for almost any server. Using Filezilla server 1.0.1 on Windows, this doesn't work. This server, supports UTF8 and reacts as expected to the FEAT command, but if trying to login with UTF8 then

Set LocalDirectory to D:\Projects\Test\_BIN\Debug

waitOnShutdownSSL=True

StrictReturnCodes=False

Setting socket timeout=120000

SecureSocket timeout=120000

SecureSocket timeout=120000

Command encoding=System.Text.UTF8Encoding

Setting socket buffer sizes=-1

220-FileZilla Server 1.0.1

220 Please visit https://filezilla-project.org/

---> USER testuser

501 What are you trying to do? Go away.

Expected reply codes = [230,232,331] (strict=False)

Purging task queue

Defaulting to Unix parsing

Killed control socket

KeepAlive thread finished.

 If I login with ANSI then it's OK and it gets the FEAT right but setting ftp.CommandEncoding = Encoding.UTF8; afterwards give me errors with non-ansi characters.
 

Set LocalDirectory to D:\Projects\Test\_BIN\Debug

waitOnShutdownSSL=True

StrictReturnCodes=False

Setting socket timeout=120000

SecureSocket timeout=120000

SecureSocket timeout=120000

Command encoding=System.Text.SBCSCodePageEncoding

Setting socket buffer sizes=-1

220-FileZilla Server 1.0.1

220 Please visit https://filezilla-project.org/

---> USER testuser

331 Please, specify the password.

---> PASS ********

230 Login successful.

---> FEAT

211-Features:

MDTM

REST STREAM

SIZE

MLST type*;size*;modify*;perm*;

MLSD

AUTH SSL

AUTH TLS

PROT

PBSZ

UTF8

TVFS

EPSV

EPRT

MFMT

211 End

ChangeWorkingDirectory('/')

---> CWD /

250 CWD command successful

---> PWD

257 "/" is current directory.

---> TYPE I

200 Type set to I

---> PASV

227 Entering Passive Mode (127,0,0,1,201,220)

Server supplied address=127.0.0.1

Server supplied port=51676

autoPassiveIPSubstitution=True

remoteAddr=127.0.0.1

SecureSocket timeout=120000

SecureSocket timeout=120000

SecureSocket timeout=120000

SecureSocket timeout=120000

---> STOR upload test.txt

150 Starting data transfer.

Closing source stream

Shutdown(Both)

Attempt to close unconnected passive data-channel.

Transferred 66 bytes to remote host

226 Operation successful

Purging task queue

Defaulting to Unix parsing

---> QUIT

200 Goodbye.

Shutdown(Both)

KeepAlive thread finished.

Any idea?

by (51.6k points)
Sorta looks like FileZilla Server 1.0.1 doesn't support UTF8?
by (9.1k points)
Which Windows Version are you using?
by (160 points)
But FEAT does returns UTF8 (?)
by (51.6k points)

Please ensure that the AutoFeatures is set to true. If you do this and the CommandEncoding property is set to Encoding.UTF8 then edtFTPnet/PRO will automatically execute the FEAT command after connecting, check for UTF8 and execute the 'OPTS UTF8 ON' command to switch to UTF8.

by (160 points)
10 Pro 20H2.
by (160 points)
As indicated on the original post... works everywhere. Not with this server. Not a big deal, just wanted to know the reason.
by (51.6k points)
Oh sorry, yes, you did say that. In that case it'd be interesting to check the log to see if the OPTS command is being executed and how the server responds. Please set the logging level to debug. You can find more information at https://enterprisedt.com/products/edtftpnetpro/doc/manual/html/howtosetuplogging.html

Please log in or register to answer this question.

Categories

...