login about faq

Hi, I have a .NET batch process that retrieves PDF files from ftp. I'm using ChilkatDotNet2 (FTP2) version 9.5.0.66. This doesn't happen all the time but once in a while the method GetRemoteFileBinaryData returns a file content length of 0. However the PDF clearly is not empty. I've basically been stopping and rerunning the process and suddenly it will work again. Anyone experience this same issue?

Dim FileContent As Byte() FileContent = Ftp.GetRemoteFileBinaryData(fileName)

asked May 04 at 18:10

jcampy's gravatar image

jcampy
1


Look at the contents of the Ftp.LastErrorText property.

Whenever a Chilkat method fails or doesn't behave as expected, look at the contents of the LastErrorText property. The LastErrorText always contains information for the last method call, even if successful. You can turn on verbose logging by setting the Ftp.VerboseLogging property = true (or 1, or whatever applies in the given programming language)

link

answered May 04 at 19:06

chilkat's gravatar image

chilkat ♦♦
12.8k317367484

This is what came back in the last error text

 
ChilkatLog:
  GetRemoteFileBinaryData:
    DllDate: Mar 20 2017
    ChilkatVersion: 9.5.0.66
    UnlockPrefix: MDCEDUFTP
    Architecture: Little Endian; 32-bit
    Language: .NET 2.0
    VerboseLogging: 0
    ProgressMonitoring:
      enabled: yes
      heartbeatMs: 0
      sendBufferSize: 65536
    --ProgressMonitoring
    downloadToMemory:
      downloadToOutput:
        modeZ: 0
        binaryMode: 1
        pbsz_protp:
          simpleCommand:
            sendCommand:
              sendingCommand: PBSZ 0
            --sendCommand
            readCommandResponse:
              processAlert:
                TlsAlert:
                  level: fatal
                  descrip: bad record mac
                --TlsAlert
                Closing connection in response to fatal SSL/TLS alert.
              --processAlert
              Failed to receive more bytes.
              Failed to read FTP control channel reply.
            --readCommandResponse
          --simpleCommand
        --pbsz_protp
      --downloadToOutput
    --downloadToMemory
    Failed.
  --GetRemoteFileBinaryData
--ChilkatLog

link

answered May 05 at 09:33

jcampy's gravatar image

jcampy
1

Thanks for your quick reply. I tried with the new build but received similar error.

ChilkatLog:
  GetRemoteFileBinaryData:
    DllDate: May  4 2017
    ChilkatVersion: 9.5.0.67
    UnlockPrefix: MDCEDUFTP
    Architecture: Little Endian; 32-bit
    Language: .NET 2.0
    VerboseLogging: 0
    downloadToOutput:
      ProgressMonitoring:
        enabled: yes
        heartbeatMs: 0
        sendBufferSize: 65536
      --ProgressMonitoring
      downloadToOutput:
        downloadToOutput2:
          modeZ: 0
          binaryMode: 1
          pbsz_protp:
            simpleCommand:
              sendCommand:
                sendingCommand: PBSZ 0
              --sendCommand
              readCommandResponse:
                replyLineQP: 200 PBSZ set to 0.
              --readCommandResponse
            --simpleCommand
            simpleCommand:
              sendCommand:
                sendingCommand: PROT P
              --sendCommand
              readCommandResponse:
                replyLineQP: 200 PROT now Private.
              --readCommandResponse
            --simpleCommand
          --pbsz_protp
          setupDataConnection:
            passive transfer mode
            setupPassiveDataSocket:
              sendCommand:
                sendingCommand: PASV
              --sendCommand
              readCommandResponse:
                replyLineQP: 227 Entering Passive Mode (23,246,200,139,46,247).
              --readCommandResponse
              dataConnect:
                hostname: 23.246.200.139
                port: 12023
                socketOptions:
                  SO_SNDBUF: 262144
                  SO_RCVBUF: 4194304
                  TCP_NODELAY: 0
                  SO_KEEPALIVE: 0
                --socketOptions
                dataConnectSuccess: 1
              --dataConnect
            --setupPassiveDataSocket
          --setupDataConnection
          sendCommand:
            sendingCommand: RETR IBR_2918897.pdf
          --sendCommand
          readCommandResponse:
            processAlert:
              TlsAlert:
                level: fatal
                descrip: bad record mac
              --TlsAlert
              Closing connection in response to fatal SSL/TLS alert.
            --processAlert
            Failed to receive more bytes.
            Failed to read FTP control channel reply.
          --readCommandResponse
          Failed to read RETR intermediate reply
        --downloadToOutput2
      --downloadToOutput
    --downloadToOutput
    Failed.
  --GetRemoteFileBinaryData
--ChilkatLog
link

answered May 05 at 10:24

jcampy's gravatar image

jcampy
1

I think the only way to investigate is to test directly with that particular server. If you're licensed and wish to provide a test account, please send email to support@chilkatsoft.com

link

answered May 05 at 10:30

chilkat's gravatar image

chilkat ♦♦
12.8k317367484

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×144
×96

Asked: May 04 at 18:10

Seen: 360 times

Last updated: May 05 at 10:30

powered by OSQA