[twsocket] FTP missing bytes
I have an automated process that has been sending FTP files to a customer for over two years with no problem. Suddenly, they seem to be missing two bytes from a file after I transfer it, which is causing problems. I did recently upgrade my ICS to the latest version. Has anything changed that might affect this? Note - I don't know if it has anything to do with ICS because I can transfer the same file to our own FTP server with no problems whatsoever. The problem is the same whether I transfer in binary mode or ASCII mode. I have noticed that I do get the 150 Opening ASCII mode data connection for 501330.zip. even when I have the binary mode check box checked in the FTPTest form. Am I always sending in ASCII mode now? Sincerely, Brad Gies - NLM Software Southfield, MI, USA - Do everything in moderation including abstinence This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and delete the material from your computer. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
Gies,Brad wrote: The problem is the same whether I transfer in binary mode or ASCII mode. I have noticed that I do get the 150 Opening ASCII mode data connection for 501330.zip. even when I have the binary mode check box checked in the FTPTest form. Am I always sending in ASCII mode now? Yes. In order to set transfer mode you must set property BinaryMode to TRUE as well as call TypeSet to send the transfer type command to the server. Same when switching back to ascii except property BinaryMode must be set to FALSE before. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Sincerely, Brad Gies - NLM Software Southfield, MI, USA - Do everything in moderation including abstinence This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and delete the material from your computer. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
Gies,Brad wrote: It seems the answer is that I now have to send the Type command before I do the PUT. Correct, except that it must be called in previous versions too, changing property BinaryMode alone does nothing. Did it used to default to binary before, and now it defaults to ASCII? The server may default to ASCII, who knows? Transfer type is a server mode, to change it you need to call TypeSet anyway. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Sincerely, Brad Gies - NLM Software Southfield, MI, USA - Do everything in moderation including abstinence -Original Message- From: [EMAIL PROTECTED] [mailto:twsocket- [EMAIL PROTECTED] On Behalf Of Gies,Brad Sent: Thursday, July 06, 2006 10:51 AM To: twsocket@elists.org Subject: [twsocket] FTP missing bytes I have an automated process that has been sending FTP files to a customer for over two years with no problem. Suddenly, they seem to be missing two bytes from a file after I transfer it, which is causing problems. I did recently upgrade my ICS to the latest version. Has anything changed that might affect this? Note - I don't know if it has anything to do with ICS because I can transfer the same file to our own FTP server with no problems whatsoever. The problem is the same whether I transfer in binary mode or ASCII mode. I have noticed that I do get the 150 Opening ASCII mode data connection for 501330.zip. even when I have the binary mode check box checked in the FTPTest form. Am I always sending in ASCII mode now? Sincerely, Brad Gies - NLM Software Southfield, MI, USA - Do everything in moderation including abstinence This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and delete the material from your computer. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and delete the material from your computer. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
From: Gies,Brad [EMAIL PROTECTED] It seems the answer is that I now have to send the Type command before I do the PUT. Did it used to default to binary before, and now it defaults to ASCII? When I originally built my little web site program for editing pages and uploading them, I was under the same impression. When my ISP changed, my web server went from a Windows-based to a Unix-based and it caused the same problem, the last few bytes not being transmitted. I had to do the same thing you need to do, set BinaryMode AND call TypeSet to make sure the correct transfer mode was used for both client and server. HTH Woody (TMW) -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
- Original Message - From: Gies,Brad Sent: 7/6/2006 11:35:48 AM To: twsocket@elists.org Subject: Re: [twsocket] FTP missing bytes It seems the answer is that I now have to send the Type command before I do the PUT. Did it used to default to binary before, and now it defaults to ASCII? Your FTP server has probably changed to a UNIX-type environment; or if it was always UNIX, the default transfer mode has been changed. What happened to the file is that it is being transmitted in ASCII mode, and a couple of bytes have been removed when newline translations were wrongly executed. This will only be a problem when transfering between heterogenous environments with differing newline sequences (e.g. from Windows to UNIX, or from UNIX to Windows). Why? Because... 1. Windows uses a CRLF (#13#10) pair for line-ends 2. While UNIX uses only the LF (#10) character for line-ends 2. Your file, even while being binary, probably contains a contiguous pair of bytes with the sequence #13#10 in it 3. These 2-byte sequences are being (wrongly) translated to the UNIX newline character #10, and a byte is being removed. If two of these sequences exist in your file, that will cause two bytes to be removed. Since the file is binary, this in essence corrupts it. As others have mentioned, the best way to avoid this is to *always* call SetType before transmitting and never assume that the server will default to the correct type. -dZ. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
Thanks for the explanations. I had no idea it was a server setting, and always assumed it would be up to the client. I guess I have just been lucky getting away with it for so long. Much Appreciated. Sincerely, Brad Gies - NLM Software Southfield, MI, USA - Do everything in moderation including abstinence -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Woody Sent: Thursday, July 06, 2006 12:45 PM To: ICS support mailing Subject: Re: [twsocket] FTP missing bytes From: Gies,Brad [EMAIL PROTECTED] It seems the answer is that I now have to send the Type command before I do the PUT. Did it used to default to binary before, and now it defaults to ASCII? When I originally built my little web site program for editing pages and uploading them, I was under the same impression. When my ISP changed, my web server went from a Windows-based to a Unix-based and it caused the same problem, the last few bytes not being transmitted. I had to do the same thing you need to do, set BinaryMode AND call TypeSet to make sure the correct transfer mode was used for both client and server. HTH Woody (TMW) -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender immediately and delete the material from your computer. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTP missing bytes
- Original Message - From: Gies,Brad Sent: 7/6/2006 1:41:41 PM To: twsocket@elists.org Subject: Re: [twsocket] FTP missing bytes Thanks for the explanations. I had no idea it was a server setting, and always assumed it would be up to the client. I guess I have just been lucky getting away with it for so long. Actually, it is a server setting -- set by the client, so it is up to the client. Your problem was that you assumed that setting the property in the client would suffice, and you were lucky that the server defaulted to the correct one (or that the server interpreted newlines in the same way). You have to set the property in the client (as you did), but then you must call SetType to tell the server about it. Perhaps this should be in the FAQ? -dZ. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be