ColdFusion
CFFTP Transfers a Zero-Byte File and Throws a Timeout Error
Although I’ve used ColdFusion for 7+ years now, I’ve never used the cfftp tag before. Yesterday, I found a reason to try it out. I figured it would be as simple as cfhttp–and it was, with one exception (no pun intended).
Here is my sample code:
<cfftp action="open"
connection="test"
server="ftp.osric.com"
username="chris"
password="********************"
timeout="60"
stoponerror="yes">
<cfftp
connection = "test"
action = "getFile"
name = "downloadFile"
transferMode = "binary"
localFile = "S:\chris\handlebar-moustache.jpg"
remoteFile = "handlebar-moustache.jpg"
timeout="60">
Here’s the error message it produced:
An error occurred during the FTP getFile operation.
Error: getFile operation exceeded timeout.
However, the local file was still created (as a zero-byte file).
The solution, in my case, was to turn on passive mode (add attribute passive="yes" to the cfftp tag).
Active FTP vs. Passive FTP, a Definitive Explanation has a brief explanation of the differences between active and passive FTP.
Joes Goals Runs on Cold Fusion
I use a pretty nifty little website called joe’s goals to track some of the things in my life. It ties in rather nicely with the google personal homepage, and has served me well for more than two years. It’s crashing today, and from the look of it, it runs on cold fusion. I must admit, I’m a little surprised. (Not that I have anything against cold fusion, you just don’t see it that often these days)
Code Reviews
I recently attended a code review at Wharton. We’ve put together some code reviews at my job, but I know that Wharton has been doing formal code reviews for years and I wanted to check out their process to compare notes. For this particular code review they were looking at a small ColdFusion application developed using Squidhead.
› Continue reading
Generating iCal files with ColdFusion
I’ve been using ColdFusion to generate and mail iCal (*.ics) files. This should be a cinch, as they are really pretty simple text files. However, when I receive the file in Microsoft Outlook 2007, I have no options to add it to my calendar and I see the following message: “As the meeting organizer, you do not need to respond to the meeting.”
This is peculiar, as my address is not the organizer specified in the iCal file, it is only the recipient of the iCal attachment. I’m going to keep looking into it, but I thought I’d mention it here in case anyone else is running into the same issue.
The two functions I’ve found online to assist in generating iCal files are:
- iCalUS (via CFLib.org)
- CF_ICAL (via Planet Source Code.
Checking for date-time conflicts
It seems like I’ve worked on a lot of applications lately that involve time slots: room reservation systems, appointment schedulers, and so on. One thing that tripped me (and some other developers) up at first was checking for conflicting time slots. It turns out, there are a variety of possible conflicts:

There are 5 unique conflicts possible, and it seems like I’m always forgetting one.
Object Overhead in ColdFusion
I have been trying to improve the speed of a ColdFusion application. It was written by a part-timer, a Java developer who was new to ColdFusion. He wrote the code almost entirely in cfscript, and he used CFC objects extensively. In fact, it seems that he overused CFC objects—to the point where the server slows to a crawl.
Pages
Archives
- January 2012
- December 2011
- November 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- February 2011
- January 2011
- November 2010
- May 2010
- March 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008