Iis – How to resolve FTP Error “Failed to retrieve directory listing” for Administrator account in IIS 7.5

ftpiisiis-7iis-7.5

Using my administrator account, I FTP connected to my IIS 7.5 FTP Site with FileZilla. I was able to successfully upload a file, but I keep getting a "Failed to retrieve directory listing" in response.

In passive mode, the command, response and error are:

Command:    LIST
Response:   150 Opening BINARY mode data connection.
Response:   550 The network connection was aborted by the local system. 
Error:  Failed to retrieve directory listing

In active mode, the command, response and error are:

Command:    PORT 192,168,1,129,102,151
Response:   501 Server cannot accept argument.
Error:  Failed to retrieve directory listing

What have I done wrong?

Best Answer

I had this issue as well, and it was related to the data ports being selected by IIS. I set it up to use a specific port range but when my client tried to use passive mode it showed that it was using the wrong port.

This article describes the method for calculating which port it is using. e.g.

227 Entering Passive Mode (x1,x2,x3,x4,y1,y2)

The IP it would be using is x1.x2.x3.x4 and port (y1*256) + y2. I was seeing the wrong values for y1 and y2 so I had to restart "Microsoft FTP Service" to actually get it to recognize the values I had set in the FTP Firewall Settings in IIS.