I have set up an FTP site in IIS 7, in Windows 2008 R2. Everything works fine, except for one thing.

We have an application already working with an old FTP server, which will be migrated to this new setup. And when i was testing it i got this strange error when i tried to NLST a folder (on the W2k8 setup).

This piece of code is what i'm using to test my new FTP. It'll connect to the FTP server, send the PASV command and connect to the replied address. Then it'll send the NLST command and return the results (GetDirectoryFiles).

    int port = 22;
    host = "192.168.60.134";
    user = "user";
    pass = "pass";
    Ftp ftp = new Ftp();
    ftp.BeginCommunication(host, port, user, pass);
    string[] files = ftp.GetDirectoryFiles("\\Folder\\subfolder");
    ftp.EndComunnication();

So this first test is returning the file names, with no path. On my other server it returns the file name with the path to the file (\Folder\subfolder\file.txt)

Now in this next piece i'm using a slash instead of backslash. It returns the file name with path.

    port = 22;
    host = "192.168.60.134";
    user = "user";
    pass = "pass";
    ftp = new Ftp();
    ftp.BeginCommunication(host, port, user, pass);
    files = ftp.GetDirectoryFiles("/Folder/subfolder");
    ftp.EndComunnication();

Both servers are Windows (2k3 and 2k8) and both use IIS (6 and 7) hosted FTP.

Is this a new "feature" of IIS 7? Can it be overridden so i don't have to make any changes to my applications?

Thanks in advance.

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.