ColdFusion Snippet Stumper

I ran across this bit of CF code in a project that I'm working on upgrading, and I was so completely confused by the it that I thought I might throw it up here to see what people think of it.

 

IE Forgets Cookies on Sub-Domains with an Underscore

Internet Explorer Fail LogoOk, so one more reason to hate IE: Internet Explorer fails to hold cookies when viewing URLs that have a sub-domain with an underscore. I found this when the project I'm developing just refused to hold on to a session when viewing the site from Internet Explorer. Almost all of the server-side technology I was using was new to me, so I lost a full day trying to figure out if it was ColdFusion 9, IIS7, or the ColdFusion on Wheels framework that was breaking the sessions before I found out that the IE browsers choke on underscores. FireFox and Chrome didn't care about the underscore, but IE6 through IE8 lost their session because they couldn't hold onto the cookies for the site.

So, if you're loosing your sessions in Internet Explorer, check your URL. I'm not sure if there are other characters besides an underscore that would cause the cookie loss, but it wouldn't surprise me.

 

Installing ColdFusion on IIS7 Still a Pain

Vista iconThis post isn't anything new, but I felt that I should document that yet another person has wasted some of their life struggling to get CF working on an IIS7 machine. I first ran into this problem about 6 months ago when trying to install CF8 on Windows Server 2008 (64-bit), and we had so many problems doing it that the server was rolled back to Windows Server 2003 (32-bit) to get around it. Today I had to get CF9 installed on a Vista, and had to deal with the same issues all over again. Luckily the solution was simpler this time, and involved only one reinstall of CF, rather than 5 and a full wipe of an OS like last time.

Why hasn't this been fixed by now?

Oh, and for those needing a solution, I found mine at Dale Fraser's Blog.

 

ColdFusion Instance Issues, Round 2

ColdFusion LogoAs some of you might know, my work place is no stranger to odd server problems, such as instances just wanting to return 503 errors. Today I have a new one: one of our applications refuses to run at full speed if its in anything other than the default instance.

 

Using ColdFusion to Zip Individual Files

I ran into an interesting situation this morning that didn't have an obvious answer. I needed to create a zip with a few specific files out of a directory with lots of possible files. The problem is that <cfzip /> is designed to work against whole directories, so at first I kept thinking that I'd have to make a temporary directory, move the files to it, and then zip the directory, but a little more persistence found the right answer.

 

Building Pages with a Page Object

I was reading through PHP and MySQL Web Development at the local bookstore the other night when I noticed that their example code for explaining object oriented concepts was a Page class that basically built a page based on its properties. While the concept of directly building the return code string by string is a little foreign to ColdFusion, I was very interested in the idea of an extensible Page object that could help me manage my applications. Read more to see what I came up with.

 

More Entries

Jon in Chicago, July 2008

I'm Jon Hartmann and I'm a C# .Net developer by day, a ColdFusion guru by night, and all around Javascript fanatic. Stay right here to read my technical posts as I grapple with mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web. Learn more about me.

Post a job. Find one. authenticjobs.com

Interested in becoming a sponsor? Contact me.