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 / C++ / MFC
  4. FTPS Connection

FTPS Connection

Scheduled Pinned Locked Moved C / C++ / MFC
securityc++sysadminhelp
5 Posts 2 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.
  • P Offline
    P Offline
    Paul2013
    wrote on last edited by
    #1

    Hello everyone, I wrote an MFC app some years ago that connects to an FTP server. Recently the server has switched over to FTPS so whenever I try to connect I get the following message:

    550 SSL/TLS required on the control channel

    I'm using the following code to connect to the server:

    CInternetSession* pSession = new CInternetSession(L"myApp", 1, 0, 0, 0, INTERNET_FLAG_DONT_CACHE);
    CFtpConnection* pFtpCon = pSession->GetFtpConnection(L"*IPAddress*", L"*Username*", L"*password*", 21);

    I was wondering if it is possible to connect to an FTPS server using CInternetSession/CFtpConnection and if so how. Or will I need to use a library to achieve this. I've searched around on the internet but can't find a definitive answer. Any help would be most appreciated. Thanks.

    D 1 Reply Last reply
    0
    • P Paul2013

      Hello everyone, I wrote an MFC app some years ago that connects to an FTP server. Recently the server has switched over to FTPS so whenever I try to connect I get the following message:

      550 SSL/TLS required on the control channel

      I'm using the following code to connect to the server:

      CInternetSession* pSession = new CInternetSession(L"myApp", 1, 0, 0, 0, INTERNET_FLAG_DONT_CACHE);
      CFtpConnection* pFtpCon = pSession->GetFtpConnection(L"*IPAddress*", L"*Username*", L"*password*", 21);

      I was wondering if it is possible to connect to an FTPS server using CInternetSession/CFtpConnection and if so how. Or will I need to use a library to achieve this. I've searched around on the internet but can't find a definitive answer. Any help would be most appreciated. Thanks.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Are you able to connect to this new server manually?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      P 1 Reply Last reply
      0
      • D David Crow

        Are you able to connect to this new server manually?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        P Offline
        P Offline
        Paul2013
        wrote on last edited by
        #3

        Hi David, I can access the server using FileZilla with no problems. I know very little about FTP/FTPS but my guess is that CInternetSession/CFTPConnection do not support SSL(TSL); I've been doing quite a lot of reading but haven't found anything to confirm this however. I think my next step is to try out curl. Thanks.

        D 1 Reply Last reply
        0
        • P Paul2013

          Hi David, I can access the server using FileZilla with no problems. I know very little about FTP/FTPS but my guess is that CInternetSession/CFTPConnection do not support SSL(TSL); I've been doing quite a lot of reading but haven't found anything to confirm this however. I think my next step is to try out curl. Thanks.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Did you read what was said here, and the suggestions?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          P 1 Reply Last reply
          0
          • D David Crow

            Did you read what was said here, and the suggestions?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            P Offline
            P Offline
            Paul2013
            wrote on last edited by
            #5

            I hadn't seen that particular post, but I've seen most of the links listed there. I did try adding ftps:// to the server name, as suggested in that link, but that returns and invalid url error. I was hoping for a simple solution but it looks to be more complicated than I hoped. Thanks for the help!

            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