none
Error in "ListDirectory" command for particular folder on ftp server in visual studio console application. RRS feed

  • General discussion

  • My code is:      

     FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://192.168.224.50/home/app/pymidol_sp/data/batch/sent_files/service/PYSV024/");
                request.Method = WebRequestMethods.Ftp.ListDirectory;

                request.Credentials = new NetworkCredential("crmuser12", "crmuser12");

                FtpWebResponse response = (FtpWebResponse)request.GetResponse();

    If the uri is:"ftp://192.168.224.50/home/app/pymidol_sp/data/batch/sent_files/service/PYSV024/", then i get error "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)."

    If the uri is:"ftp://192.168.224.50/", then i get response correctly.

    Also, from "command prompt",  i am successfully able to list files from path "ftp://192.168.224.50/home/app/pymidol_sp/data/batch/sent_files/service/PYSV024/"

    Please help to identify that at which end basically problem is ocurring??

    thanks in advance. please reply as soon as possible.

    Tuesday, December 2, 2014 8:06 AM

All replies