Chilkat ftp2 getfile下载失败:下载的字节数正确,但小于(错误的)预期值

时间:2019-03-13 08:57:28

标签: download ftp downloadfile chilkat

我想就这个奇怪的问题寻求帮助:在Chilkat ftp2错误消息中,下载的字节数正确,并且等于远程文件的字节数,但是给出的错误是“下载的字节数少于预期的数量”因为expectedbytecount是错误的,并且似乎是PREVIOUS FILE的字节数...

我的情况是:

  • ftp2.AutoGetSizeForProgress属性= 0
  • 在GetFile之前调用的ftp2.ClearDirCache方法

您对此有任何建议吗?我附上收到的xml错误消息。

<GetFile>
<DllDate>Aug 30 2017</DllDate>
<ChilkatVersion>9.5.0.69</ChilkatVersion>
<UnlockPrefix>DELTASFTP</UnlockPrefix>
<Architecture>Little Endian; 32-bit</Architecture>
<Language>.NET 4.6 VS2017</Language>
<VerboseLogging>0</VerboseLogging>
<ProgressMonitoring>
  <enabled>yes</enabled>
  <heartbeatMs>0</heartbeatMs>
  <sendBufferSize>65536</sendBufferSize>
</ProgressMonitoring>
<downloadToFile>
  <localFilename>C:\Porro\PIGRECO_UPD\201903081414_TMP\PIGRECO_DB\DATABASES\PORRO.DB.key</localFilename>
  <downloadToOutput2>
    <modeZ>0</modeZ>
    <binaryMode>1</binaryMode>
    <setupDataConnection>
      <info>passive transfer mode</info>
      <setupPassiveDataSocket>
        <sendCommand>
          <sendingCommand>PASV</sendingCommand>
        </sendCommand>
        <readCommandResponse>
          <replyLineQP>227 Entering Passive Mode (80,16,52,55,157,196)</replyLineQP>
        </readCommandResponse>
        <dataConnect>
          <hostname>80.16.52.55</hostname>
          <port>40388</port>
          <socketOptions>
            <SO_SNDBUF>262144</SO_SNDBUF>
            <SO_RCVBUF>4194304</SO_RCVBUF>
            <TCP_NODELAY>0</TCP_NODELAY>
            <SO_KEEPALIVE>0</SO_KEEPALIVE>
          </socketOptions>
          <dataConnectSuccess>1</dataConnectSuccess>
        </dataConnect>
      </setupPassiveDataSocket>
    </setupDataConnection>
    <sendCommand>
      <sendingCommand>RETR PORRO.DB.key</sendingCommand>
    </sendCommand>
    <readCommandResponse>
      <replyLineQP><![CDATA[150 Opening data channel for file download from server of "/PIGRECO_UPD/201=903081414/PIGRECO_DB/DATABASES/PORRO.DB.key"]]></replyLineQP>
    </readCommandResponse>
    <downloadRate>0</downloadRate>
    <totalNumBytesReceived>10</totalNumBytesReceived>
    <receiveTimeMs>Elapsed time: 16 millisec</receiveTimeMs>
    <info>Data connection closed.</info>
    <readCommandResponse>
      <replyLineQP><![CDATA[226 Successfully transferred "/PIGRECO_UPD/201903081414/PIGRECO_DB/DATABASE=S/PORRO.DB.key"]]></replyLineQP>
    </readCommandResponse>
    <error>Downloaded byte count less than expected byte count.</error>
    <downloadedByteCount>10</downloadedByteCount>
    <expectedByteCount>93756912</expectedByteCount>
  </downloadToOutput2>
  <downloadToOutput>Elapsed time: 93 millisec</downloadToOutput>
</downloadToFile>
<error>Failed.</error>

0 个答案:

没有答案