Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by (400 points)
I have been using edtftpnet.dll for some time now and in my VB code I use

Dim files As Array = FTPClient.Dir(strfilter, True)

to obtain a listing of files in a remote server folder [strfilter]. I have had no problems until a couple of days ago when my code started failing at this line with the following error message:

at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPClient.Dir(String dirname, Boolean full)

My code has not changed for some months and I am at a loss in understanding why I now get these errors. I can still connect with the server and upload and download files with my code - I just can't get a Directory listing.

Thanks,

NagaJim

3 Answers

0 votes
by (162k points)
Do you get an error message at the start of the stack trace? Got a log file? (see the Dev Guide or example code).
0 votes
by (400 points)
Thank you for your reply.

I have identified the problem. It would appear that the server no longer accepts or responds correctly to a Directory listing query which has wildcards in it.

ie Up until recently the following query returned a valid result:

FTPClient.DIR("./htdocs/trains/*.tr*",True)

However this now causes an error because of the wildcard specifiers "*".

If these are removed then no error is generated.

ie FTPClient.DIR("./htdocs/trains/",True) generates no error and returns an unfiltered Directory listing.

So now I have to get the full Directory listing and then filter in my code.

I have approached the Server Hosts to try and obtain some information as to why this error is being generated.

Thanks,

NagaJim
0 votes
by (162k points)
Perhaps they've upgraded it. Unfortunately there is not much consistency amongst FTP servers.

Thank you for your reply.

I have identified the problem. It would appear that the server no longer accepts or responds correctly to a Directory listing query which has wildcards in it.

Categories

...