Downloading file (with out extension) from Ftp throwing error
-
This is my code
reqFTP = FtpWebRequest.Create(new Uri("ftp:\\1.1.1\myfile")) as FtpWebRequest;
if (reqFTP != null) { reqFTP.Proxy = null; reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; reqFTP.Credentials = new NetworkCredential("username", "pwd"); reqFTP.UseBinary = true; using (FtpWebResponse response = reqFTP.GetResponse() as FtpWebResponse)
myfile is the file with no extension when i debug i get an error in response = reqFTP.GetResponse() as below The remote server returned an error: (550) File unavailable (e.g., file not found, no access). pls help to solve this thanks in advance
-
This is my code
reqFTP = FtpWebRequest.Create(new Uri("ftp:\\1.1.1\myfile")) as FtpWebRequest;
if (reqFTP != null) { reqFTP.Proxy = null; reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; reqFTP.Credentials = new NetworkCredential("username", "pwd"); reqFTP.UseBinary = true; using (FtpWebResponse response = reqFTP.GetResponse() as FtpWebResponse)
myfile is the file with no extension when i debug i get an error in response = reqFTP.GetResponse() as below The remote server returned an error: (550) File unavailable (e.g., file not found, no access). pls help to solve this thanks in advance
That seems pretty straightforward. There is no file matching this at that location. BTW, you should use / not \ in your URI.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
This is my code
reqFTP = FtpWebRequest.Create(new Uri("ftp:\\1.1.1\myfile")) as FtpWebRequest;
if (reqFTP != null) { reqFTP.Proxy = null; reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; reqFTP.Credentials = new NetworkCredential("username", "pwd"); reqFTP.UseBinary = true; using (FtpWebResponse response = reqFTP.GetResponse() as FtpWebResponse)
myfile is the file with no extension when i debug i get an error in response = reqFTP.GetResponse() as below The remote server returned an error: (550) File unavailable (e.g., file not found, no access). pls help to solve this thanks in advance
-
This is my code
reqFTP = FtpWebRequest.Create(new Uri("ftp:\\1.1.1\myfile")) as FtpWebRequest;
if (reqFTP != null) { reqFTP.Proxy = null; reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; reqFTP.Credentials = new NetworkCredential("username", "pwd"); reqFTP.UseBinary = true; using (FtpWebResponse response = reqFTP.GetResponse() as FtpWebResponse)
myfile is the file with no extension when i debug i get an error in response = reqFTP.GetResponse() as below The remote server returned an error: (550) File unavailable (e.g., file not found, no access). pls help to solve this thanks in advance
FYI: chances are the FTP site is treating file names in a case-sensitive way, unlike Windows, so you'd better make sure the casing is correct. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.