Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Downloading file (with out extension) from Ftp throwing error

Downloading file (with out extension) from Ftp throwing error

Scheduled Pinned Locked Moved C#
helpsysadmindebugging
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arun_pk
    wrote on last edited by
    #1

    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

    P R L 3 Replies Last reply
    0
    • A arun_pk

      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

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • A arun_pk

        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

        R Offline
        R Offline
        Ravi Sant
        wrote on last edited by
        #3

        Check the file path.

        1 Reply Last reply
        0
        • A arun_pk

          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

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups