I've noticed a strange behavior in my File Transfer wrapper around the edtdtp library. If I'm doing a binary transfer, the BytesTransferred event faithfully and reliably reports the current progress and at the end of the transfer the e.ByteCount property matches the size of the file being transferred.
However when using the same library doing an ASCII file transfer, the bytecount always stops about 5-6KB short of the actual size of the file. I've compared the actual files involved in the transfer (source and destination) and they are identical to the byte. It's just an issue of the reported byte count being off at the end of the transfer which in turn makes the user think that there was a problem with the transfer.
I am setting the TransferType property of the FTPClient class to either "ASCII" or "BINARY" depending on the type of file being transferred (either a zip file or an xml document).
Any suggestions on how to get the byte counts to match up?
Thanks,
Shawn.