[Looking for Charlie's main web site?]

CF911: Want to modify the CF Step Debugger's use of a random port?

Here's a quick tip (and some elaboration): if you've noticed that the CF step debugger (in CF 8 or 9) causes CF to listen on a randomly changing port, you can change that behavior (assuming you have good reason to do so, such as perhaps some challenges with firewall configuration).

It's a simple JVM tweak to cause it to use a fixed port:

-DDEBUGGER_SERVER_PORT=portNumber

You can add this either in the "Java & JVM" page of the CF Admin (if in Standard or Enterprise Server), or on the java.args line in the jvm.config file (for any form of CF).

You do need to restart CF for this to take effect.

A few warnings are in order

[....Continue Reading....]

Spying on ORM database interactions: Hibernate, Transfer, etc. on any CFML engine

As people use CF9's ORM feature (or other ORMs like Transfer and Reactor, or indeed Hibernate, on any version of CF6+ or indeed any other CFML engine), they may be left wondering what sort of SQL interactions happen "under the covers" between the ORM framework and the database engine (whether in a given request, or perhaps at startup of CF).

Well, there are several ways you can watch them, as this entry will discuss, and some may be better suited to the job than others. It can be very interesting to discover what's going on, especially if you're having any suspected performance problems which you think may be related to ORM processing (or just if you wonder what all it does for you).

As for spying on the SQL, of course ORM support is just a different way that the CFML engine (through the ORM framework) sends SQL to a database via a regular DSN, just like any other request, so there's nothing really "tricky" about this. It's just about realizing that while you don't write the SQL yourself, it's still generated by the CFML engine/ORM framework, and you may not realize/consider the available tools which can spy on it, just like any other DB processing from within CF. Indeed, some people may not even realize how many options exist to spy on JDBC interactions from their CFML engine to the database engine.

The good news is that there are several approaches, some included in CF (some depending on the edition), and some available separately which would work in any edition of CF or the other CFML engines (Open BlueDragon, Railo, etc.), and with any of the ORM frameworks. And again, some may be better than others for certain challenges.

(FWIW, besides the aforementioned Transfer and Reactor, there are still other ORM solutions for CFML, which I mention in my CF411 list as CFML ORM Frameworks. Indeed, note that you can run Hibernate on CF prior to CF9, if you want to. This is a recovery of a blog entry that no longer exists, recovered via archive.org.)

Built-in ORM Logging Option

First, note that for those using CF9+ ORM, there is indeed a built-in option in the CF ORM setup where one can enable logging, settable in the application.cfc: see the this.ormsettings option and its available key/value pair, logSQL="true".

There are several resources where you can learn more on that (and a related log4j property file approach to logging this). Besides the CF9 docs page on the ORM settings, there is also a blog entry by Adobe engineer Rupesh Kumar.

The default is to log this information to the console, but you can manipulate those log4j settings to tell it to use a file (see the links above). Even so, this will result in quite a lot of data being logged, which you will then need to connect back to your specific requests. The following approaches may be preferable.

Using FusionReactor or SeeFusion

Users of any CF edition (6+) or any CFML engine (Railo, OpenBD, or BD 7+) can use tools like SeeFusion and FusionReactor, which have always had the ability to monitor database interactions by "wrapping" the datasource to be monitored. FusionReactor engineer John Hawksley has posted a recent article specifically on monitoring CF9's ORM interaction, in the FR Devnet site, Using FusionReactor's JDBC Driver Wrapper With ColdFusion 9 ORM. Its concepts would apply to any ORM, of course.

Similarly, I've written generically about FusionReactor's database monitoring feature in What is the FusionReactor datasource monitoring feature? Why would I use it? Powerful stuff. As I point out in that article, the concepts discussed apply as well to SeeFusion's ability to monitor queries by wrapping datasources.

That said, it's worth noting that FusionReactor does have a couple of advantages, in that it provides for the display of all queries for a given request (while viewing the details of that request), whereas SeeFusion only lets you see the slowest query in a given request. FusionReactor also provides a separately available display of all the slowest queries (across all requests). It also logs every query (connecting it to a given request as well), while SeeFusion (Enterprise, at least) can also log the slowest queries to a database.

And note that both of these track any requests coming out of CF, not just those associated with a given request. So if there is ORM SQL that is associated with the startup of CF, that's tracked too. (And for those aware of issues with CF's Client Variables, such DB activity is also tracked, even that done by the hourly purge, which takes place on a background, non-jrpp thread.)

CF Enterprise Server Monitor

Those running CF 8 or 9 (Enterprise only) will find that its available Server Monitor does offer built-in monitoring of the SQL executed against CF datasources, at least, as long as you enable "Start Profiling" (which also enables other features, and overhead, as well). In this way, the Enterprise Server Monitor can monitor database interactivity, including ORM interactions.

Unlike FusionReactor (and like SeeFusion), it focuses only on showing queries that exceed certain limits, and at that it shows them only in a "Slowest Queries" interface, tracking the slowest queries among all requests. The CF Enterprise Server Monitor also has no logging ability at all.

Being able to see every single DB interaction for a given request (or across all requests) may be all the more interesting for discovering/observing what's happening with ORM interactivity.

Another alternative CF feature

Still another little-known feature for spying on JDBC interactions in CF is by way of the JDBC "spy" feature, which does in fact allow logging of all JDBC interactions mde from within CF. This feature was first enabled by way of the DataDirect 3.5 driver update which was made available (as an optional upgrade for 6 and 7) in the CF 7.02 timeframe. I wrote about the Spy feature back back in Aug 2006.

Since then, CF 8 (and now 9) offer it instead as a new "log activity" option in the "advanced settings" for a datasource definition in the CF Admin (which is disabled by default). I pointed this out in another entry from 2007 as one of many easily missed changes for the CF 8 Admin.

This "log activity" output is not as easy to interpret as FusionReactor's logs, and can indeed be voluminous (moreso than FR's), so be careful. Anyway, it's one of the several ways you can monitor JDBC interactions between CFML and your DB engine. Again, any of these may be useful for monitoring any of your CFML/database interactions.

Generic DB Monitoring tools

Indeed, it's worth noting finally that while the focus here has been watching the DB interaction from CF (and the ORM framework) to the database (by watching the JDBC traffic going out of CF and returning), you could just as well watch the DB interactivity from the DB's perspective instead (watching it coming and and being returned).

There are many tools that can monitor database processing, available for each of the major databases (free and commercial). I list several such tools in one of my CF411 section, Database/SQL Monitoring Tools.

Hope all that's helpful, whether you use ORM or not.

You may have mistakenly applied an 8.0 CHF on a 8.0.1 CF server, and not realize it!

I just helped a customer today solve a problem where he swore he had applied the latest Cumulative Hotfix (CHF) for CF 8.0.1, but I showed him that instead he had mistakenly applied the CHF for 8.0. I know how it happened, and showed him. I hope how you can avoid the same mistake.

[....Continue Reading....]

ColdFusion 8 migration resources (from 6, 7, or even earlier)

Someone asked me about migrating from CF 6 to 8, lamenting that he couldn't find any migration resources. Sadly, there are no official Adobe resources for upgrading to CF8, but I will mention a guide to upgrading to CF 7 from CF 6 (or even 5) that Macromedia offered, which many may have missed. I'll also point out a couple other things and blog entries of others that do focus more on moving to CF 8 specifically (and perhaps others will comment with still more.)

Who's only now moving to CF 8, you ask?

Some may ask, "why would someone be moving to CF 8 now, which CF9 on the horizon?". Well, a lot of shops don't upgrade immediately, so the question didn't surprise me. So some may only now be moving to 8, and they may not be interested in moving to CF9 for a while. Heck, some (like him) are running only on CF 6, or earlier! Let's just be glad when they people do finally migrate. :-)

And who knows, there may be some who move to CF 9 from 6 or 7, and this info may help them down the road, too.

So, as Casey Kasem used to say, "on with the countdown". :-)

60 page "Migrating Applications to ColdFusion MX 7"

I first pointed out to him that there *was* in fact available in the past an official Macromedia CF document (in the CF7 docs):

Migrating Applications to ColdFusion MX 7 (PDF)

At 60 pages, this is quite a good resource to consider. It "describes migration and known compatibility issues between ColdFusion Server 5 and later versions, including ColdFusion MX 6.1 and ColdFusion MX 7."

Sadly, it was not updated for CF 8, but really, the bigger differences in things were between 6 (being the first release after the rewrite of CF on java) and higher. Of course, those moving from 5 (when CF was written in C++) to higher face far more differences. Again, the guide even covers that. So even those skipping 7 to go to 8 should at least look at the guide.

Never heard of the guide? I'm not surprised. I'll take that up at the end of this entry.

Jim Priest Sought CF8 Migration Stories

Now, he did ask about migration to CF8 specifically.

There was at least one blog entry, from Jim Priest, that sought such CF 8 migration stories.

In the comments, someone commented about "CF8 performance on our CFC-driven apps" after the upgrade to 8. As many now know, that was likely due to a bug in the JVM, rather than CF. CF 8 came running on on JVM 1.6.0_04. Early in the CF8 lifetime, people suggested dropping back to JVM 1.5, but by late 2008 Sun had fixed the problem in 1.6.0_10, and that became the recommendation. Many blogged about it, including Sean Corfield and Ryan Stille who also walks you through making the upgrade.

Someone also commented (in Jim's CF8 Migration Stories entry) about losing their CFIDE directory after the upgrade. I don't know if this is the exact problem, but there was a similar issue documented in the CF 7 timeframe: "CFIDE and cfdocs folders removed after migrating from ColdFusion MX 6.1 to ColdFusion MX 7".

Jim's entry has comments closed for now, so I can only offer these thoughts here. I just asked him by email if he may reopen it to let people post observations like these, to help people who may yet find it and the older comments. We shall see.

Josh Adams offers still more resources

I just found also that Josh Adams (of Adobe) also blogged about Migrating from ColdFusion 5 or older to ColdFusion 8. He shares some other interesting resources, though not that CF7 migration guide. I'll drop him a note and I suspect he'll get that added ASAP. :-)

Steven Erat's discussion of migration from 4.5 to 7

Again, while not specifically about moving to CF 8, Steven Erat did blog some resources to help someone making the move from 4.5 to 7, in his entry, Migrating applications across a six year gap in ColdFusion server implementation. That offers a link to the Migration Guide above but also release notes for each release between 4.5 and 7.02, which is a nice touch.

Don't forget to apply hotfixes

Besides looking at the release notes for each release (something I also highly recommend), I'll also remind folks to also always check for updates, hotfixes, and cumulative hotfixes for any release you may install. What you download (even today from Adobe) may not be the absolute latest version of whatever release you get.

I'll do a blog entry about that with more details in the future. (I did discuss it in my CFMythbusters talk, and the PDF there has some good pointers to get you started on this topic, among others.)

No surprise if you never noticed that CF7 Migration Guide

Sadly, you won't find that CF7 Migration Guide I mentioned on the CF7 livedocs page, since it's a PDF (never made as an HTML file, which the livedocs are). Instead, it's listed on a different CF7 documentation page, that can itself be easily missed. (It is linked to from the CF product and support pages.)

And again the Migration Guide wasn't updated for CF8, so of course it's not mentioned on either the CF8 equivalent of that page or the CF8 livedocs page. Still, since the "changes" from 7 to 8 weren't substantial (new features, not many--if any--breaking changes), the guide helps those moving from CF 5 or 6 to 8, too.

Some won't want to miss the substantial Getting Started Guide

Finally, while we're mentioning CF7 docs that people may have missed, check out also "Getting Started Building ColdFusion MX Applications". That is/was at least listed in the CF7 livedocs (and the other doc link), above. Still, it seems many missed it. It's over 150 pages of great introduction to CF application development (and yes, it shows use of CFCs not just tired old CFQUERY/CFOUTPUT development). Sadly, it too was not upgraded for CF 8 (or 9). It was a great resource for those getting started with CF. I still recommend it all the time.

What other CF 8 Migration resources exist?

So that's my "quick" answer to the person asking for CF8 migration resources. Anyone have more? Whether moving to 8 from 7, or 6, or earlier? :-) Comment here. Readers will be grateful.

I'll prime the pump with a couple more, where people described challenges they faces:

Hope that's helpful. And since I give a nod to Casey Kasem at the opening, I suppose some will think I should mimic his successor, Ryan Seacrest, in closing here. This is "Arehart, out". :-)

"Using Apache Derby", watch my Max presentation

Did you know that CF8 (Enterprise, Standard, and Developer) has an embedded Apache database called Derby? Have you wondered what it's about? Why you might consider it? How to use it, and how to use it with other tools? Well now you can watch/listen to my Max presentation, "Using Apache Derby: the Open Source DB Embedded in CF 8", which is one of many Max NA 2008 videos which Adobe has released at tv.adobe.com. You can find a description of the talk here.

I actually did 2 Max talks (in addition to my Unconference talks), and I mentioned the other in a previous entry.

I'll note as well that I list this and all presentations I do, with links to PDFs or recordings, at the presentations section of my site.

Finding other CF Videos at tv.adobe.com

Finally, note that you can find other CF videos by selecting the "all product" category and choosing CF. Of course, you can also use the search field as well to find specific speakers or topics.

"ColdFusion 8 Best Kept Secrets", watch my Max presentation

Think you know all the things that were new in CF 8/8.01? Could you name several dozen? If not, you can watch/listen to my Max presentation, "ColdFusion 8 Best Kept Secrets", which is one of many Max NA 2008 videos which Adobe has released at tv.adobe.com. You can find a description of the talk here.

I actually did 2 Max talks (in addition to my Unconference talks), and I've mentioned the link to the other in another entry (so as to title and categorize it separately).

I'll note as well that I list this and all presentations I do, with links to PDFs or recordings, at the presentations section of my site.

Different links for Max videos have been shared

Indeed, FWIW, I'll clarify that on that presentations page I previously listed a link to a recording of the talk which was available only to registered Max attendees. Unlike the first link offered above, at tv.adobe.com and open for all to view, this other link was at groups.adobe.com, specifically the Adobe Groups Max NA site, which required a login and you could only join if you were a registered Max attendee.

Sorry if that last part's confusing. It's just a result of Adobe trying different ways to make the content available, which was happening at the same time that the Adobe layoffs were happening.

Let's just thank them for providing the videos at all, and especially for all the free ones at tv.adobe.com.

Finding other CF Videos at tv.adobe.com

Finally, note that you can find other CF videos by selecting the "all product" category and choosing CF. Of course, you can also use the search field as well to find specific speakers or topics.

CF911: CF 8 Server Monitor reports "ColdFusion Server is unavailable" (solution)

Here's another entry in my CF911 series. If you try to open the CF8 server monitor and get the error "ColdFusion Server is unavailable", the problem may be in your web server configuration. In this entry, I help you confirm if you're getting the problem I refer to here, and of course I show the solution (3 actually), with a caveat.

Here's a screenshot of what you may see:

Note that this is not an error related to logging in. You do need to fill in a username to log into the Server Monitor, even if CF is set to only ask for a password when logging into the Admin. Just use "admin". This and other facets about the CF8 Server Monitor are covered in a 4-part series of articles I did in the Adobe Dev Center, starting here.

Confirming this is the cause of your Monitor challenge

From my observation, this error is related to a problem with the Flex client being able to talk to the server using a URL it needs to use, and the problem is web server related.

You can confirm if what I'm about to describe is your issue by trying to access the URL that the server monitor tries to use to access the Flex Gateway for CF, such as:

http://localhost/flex2gateway/

Actually, you should use whatever domain name/port you're using to access your CF Admin, which is then used when you ask it to open the CF8 monitor, which may be a URL like this:

http://yourserver/CFIDE/administrator/monitor/launch-monitor.cfm

Anyway, if that test attempt to open the /flex2gateway/ url comes back with a "file not found" (or 404) error, as opposed to a blank page, then you likely have the problem I'm describing, whereby your web server is mistakenly looking to verify that a file exists for the path you're specifying. You have 2 solutions.

First, let me note that this flex2gateway URL is not a file, nor a directory. It's a value intercepted by a servlet filter defined within CF. You need to tell your web server not to check for any existing file (it's trying to use one of the "default documents" that are used when only a path to the web server is provided.) Before launching into how to fix your web server, you may want to consider one other possibly simpler alternative.

Changing to use the Internal Web Server

Some will note that I've used no port above in the URL. That's why I point out for you to try whatever URL is used to access your Admin. In the case above (and the people who have reported this problem so far that I've seen, they've been trying to access the CF admin using their external web server, IIS.

If instead you were to use the CF internal web server to access the CF Admin, you'd have a port in the URL, like this:

http://yourserver:8500/CFIDE/administrator/monitor/launch-monitor.cfm

(or it could be 8300, or 8301: whatever is the port for accessing the built-in web server for CF, if you chose to implement that when CF was installed, and you are accessing the Admin that way.)

Well, I'd propose that if you DO use the internal web server, you probably won't get this error at all. The problem seems related to using IIS to access the Admin (and the CF 8 Server Monitor).

That said, I'll suggest that one quick solution folks can try is to see if indeed they can access their CF Admin (and monitor) using the internal web server. (If you can't or won't use it, I have the solution for getting it to work with IIS, in a moment.)

You just need to know what port to use to access the internal web server, if it's enabled.

First, you may find that if (on Windows) you use Start>Programs>Adobe>ColdFusion 8>Administrator that it will open using the built-in web server. If it does, see if using that gets you around this whole problem.

If that opens it with external web server (doesn't use a port like those above), or if you aren't on Windows and have no Start menu, you can also get the web server port (and indeed enabled it, if disabled) by way of the jrun.xml file. Rather than detail it here, I'll point you to a couple of resources:

Configuring the Macromedia ColdFusion MX built-in web server is an old technote, but the info still applies. Where it talks about disabling the internal web server, you'd want to reverse that, of course. There can be more subtleties and challenges to running the CF admin on the internal web server, if you don't configure it that way at the start, such as where are the /CFIDE files? Are they in the [cf]/wwwroot? or in your web server doc root, like inetpub/wwwroot? The built-in web server will look for them in the [cf]/wwwroot, so you may need to copy the CFIDE into this directory, or add a mapping to the built-in web server to point to the path as being located externally.

Making the change in IIS

Or you could just fix IIS to let you access the server monitor via IIS. The problem may be due to a setting in IIS (verify that files exist) that you may have caused to be set. (I don't know if it's set by default when CF is configured to integrate with a site, but I wouldn't think it was, so maybe this affects those who add new sites or configure things manually.)

And since this problem may affect other Flash/Flex apps trying to talk to CF, it may be worth doing for all such users. But this does come with a caveat to be aware of, if you might be using NTLM security to control access to files requested via IIS. More in a moment.

I offer the solution for IIS 6 and 7. I don't know if the same problem can affect Apache. If so, and anyone can offer the solution for there, please do comment.

Making the change in IIS 6

For IIS 6, launch the IIS Manager and select the web site which has the CF Admin you're trying to use. (It may be that you've also configured IIS so that ALL web sites are configured for CF, in which case this setting would be not at the site-level but at the root server-level, so you'd select the server name instead in the left IIS pane.)

From there, right-click and choose properties, and then select the "home directory" tab, then in the "application settings" area click the "configuration" button, and in the "wildcard mappings" section you should see something like "C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll" (which will be different, of course, for the JRun4-based Multiserver deployment).

This value is implemented here during the install of CF if you tell it to integrate with IIS, or by your running the CF Web Server Configuration tool after the fact.

Select it, and choose Edit, and if the "Verify that file exists" option is checked, un-check it. This setting can be confusing: you may think it means "verify that the named executable exists", but it doesn't. It refers to whether files requested and passed through this handler should be checked to confirm if THEY exist. Here's a depiction of the setting and how to get there.

Now try the URL above, and it should no longer give a 404. Then try again to login into the Admin. (Actually, you may find that you can just click the "cancel" button and it will login, even if the values for username and password are blank. I find this helpful when the CF server is temporarily unresponsive too, and the Monitor login screen pops up.) Hopefully the server monitor now works for you.

Note that this was NOT about changing the handler mapping for .cfm files, which also offers an option to control the "verify that file exists".

A caveat about access via IIS to NTLM secured files, and another alternative

Thanks to Mike Gillespie for the following notice and clarification. If you use NTLM security (windows integrated authentication in IIS) to secure files accessed via IIS, then you DO NOT WANT TO make the above change for your IIS site. I share below what he offered to me.

But I'd point out again that even with that issue, you could still use the built-in web server is a solution. Or, sticking with IIS, you could also create a new IIS site just for accessing the CF admin and monitor, and make the change above for that site only.

Anyway, if you do use NTLM security to control access to sites requested via IIS, consider the following:

The check that file exists option is required if you want to use NTLM perms to secure .cfm files. http://www.adobe.com/go/tn_18516 (Steps 1-4)

If you have a secure folder on your webserver put a .htm file and a .cfm file in it. Do not give your ID access to that folder. In IIS turn on clear text and NTLM auth.

With the "check that File Exists" option unchecked, try this test.

Try to access the .htm file in the browser - access denied

Try to access the .cfm file in the folder, - access GRANTED - so much for NTLM perms

Now check the box and try again (you will need to recycle cf and IIS)

Try to access the .htm file in the browser - access denied

Try to access the .cfm file in the folder, - access denied as it should be - but flash forms and server monitor are dead.

So "fixing" the Server Monitor problem on an authenticated server just broke the security of the server for the sake of monitoring... [frown>]

In a nutshell.

If you implement this so that CF pages can be authenticated against Windows Security http://www.adobe.com/go/tn_18516, then Flash forms break (and the server monitor too). So to get flash forms (and the server monitor) working, you have to implement this, which fixes flash forms (though every user gets their own personal file on disk on the server that has to be cleaned up) but it does not fix the server monitor.

It is the "check that file exists" selection that breaks the Server Monitor (and flash forms).

On a cf webserver that grants anonymous access there is no reason to check the "check that file exists" box. However, on a server that does authenticate users for NTLM file access, that box should be checked.

This section above was added after the entry was first posted.

The change for IIS 7. None needed?

For IIS 7, it's a little different. I actually run IIS 7 (Vista) and am not sure how/where the wildcard mapping equivalent got created (I may have fudged it manually), but it's now listed as a "Handler Mapping" (in the properties for a web site). In my case, it's labeled "AboMapperCustom-32635", but just look at those listed as handling "*" meaning all requests. It's listed with a value of IsapiModule in the Handler column. (If you're looking at a specific site, and the "Entry type" column says "Inherited", then there is another mapping at the server level, so select your server name in the left IIS panel, and repeat.)

Even so, I see no option to control "verify that file exists", so maybe this problem can't happen in IIS 7. I will say, FWIW, that there is indeed a an equivalent to that "verify that file exists" option, at least for specific extension handler mappings. Look a the one for .cfm, for instance. Double-click it to see its properties, and note a new button called "request restrictions". It has an option, "Invoke handler only if request is mapped to", and an option of "file". Again, though, this does not affect requests to non-cfm requests like that for the /flex2gateway/ URL.

About other Flex/Flash apps

As I said, it may be that the info above will help other Flex apps having trouble talking to CF (the CF8 monitor is a Flex app), but I'll note that this problem doesn't affect all Flex apps: only those that connect to CF via IIS.

For instance, on this same server where this problem occurred, there was never any problem using FusionReactor (which is also a Flex app). It was working fine the whole time. But then its default behavior is also to use its own Built-in web server, so requests weren't going through IIS. If I did try to use IIS to access FusionReactor, then it too failed (with a file not found), and the fix above solved that.

CF 8.01 includes licensed technology. Things that make you go hmm.

I happened to notice today that the 8.01 release notes end with this reference: "Portions include technology used under license from Autonomy", and later it lists "TVirtualStringTree". These made me wonder: who/what were Autonomy and TVirtualStringTree?

I did a little digging, and hadn't seen anyone else write about these (it seems) in the CF blogopshere, so I'll share what I found. They're nothing dramatic.

Autonomy=Verity

In the first case, I guess I just missed the news, but back in 2005, Autonomy acquired Verity. (Seems like the acquisition last month of MySQL by Sun. Doesn't appear to have been too significant in the grand scheme. The tools continue to be known by their former company names.) Also, more digging found that this had been mentioned in the 8.0 release notes as well, but I just hadn't noticed it. FWIW, there was no mention in the CF7 notes/docs that I could see.

TVirtualStringTree in Report Builder?

What about TVirtualStringTree? Well, that isn't as obvious. It appears to be a Delphi component, and the only thing I can think of that's written in Delphi that might have been updated for 8.01 would be the CF Report Builder. Perhaps Dean Harmon or someone else from Adobe can confirm that guess. It's not important, of course.

Just one of those "things that make you go hmm" (to the younger folks out there, that's a reference to a bit from the old Arsenio Hall show of the early 90s. Gosh, now I know how my parents must have felt when they'd talk to me about the the Jack Parr show, when I was a teen in the 70's!)

PS: Searching the CF blogs

BTW, I said I hadn't seen any mention of this in the CF blogosphere. Was I going only on my memory? Heavens, no. I don't at all claim to have read most (or even 10%) of all many, MANY blogs out there on CF. It's great that there are so many, and that we have so many CF blog aggregators. But even then, none let you search all the past blog entries (at least it seems to me, as I searched for some text on that entry in all the aggregators and none found it).

So how does one do a quick search of most CF blogs? Well, last year I created a Google Custom Search Engine I call CFSearch. It lets me (and you)search only CF-related blogs and other resources. There are other CF CSEs out there, and I wrote about them back when I created mine.

I make a bookmark link for my CSE so that I can do such a search easily. Hope you'll consider doing the same.

Working around an issue with CF and IIS 7 (related to .NET)

Here's a tip about an error others may hit when configuring CF with IIS on Vista. I'll clarify that I'm on CF8, Vista SP1, and may possibly have installed some .NET 2.0-based apps or products, all of which could have contributed to this issue. YMMV.

UPDATE: I have an update on this: the reason I had the issue was not related to SP1. And it wasn't that I'd "installed a .NET 2.0 app" since I installed Vista. Rather, it turns out that it was because I'd restored from backup some files into my IIS docroot that included a web.config that DID have .NET 2.0 config entries. Even so, this could happen to others, or to others who DO install .NET 2.0 apps, so I leave it for others to consider.

I'd been running Vista for a while on my development machine, and though I'd installed CF8 on it without problem, I chose at first to use the built-in web server to start (both with the standalone and multiserver deployments of the CF8 Developer edition.)

Today I decided to hook it to IIS. Since I'd not made the choice to use IIS on install of CF 8, I of course used the web server configuration tool (start>programs>adobe>coldfusion 8>web server configuration tool). Though I'm on Vista Ultimate and could define more than one web site (a nice bonus of the Ultimate and Business editions all Vista editions, without needing to buy a Server edition of Windows), I had not defined any beyond the default web site. (Update: I spoke today with Bill Staples, one of the folks in charge of IIS 7, about this whole issue, which is when I realized it came about from me doing the restore. Anyway, he said that the support of multiple sites is something in all editions of Vista. Nice.)

(One interesting thing that happened was I got a popup telling me that CF would need a few minutes to configure itself with IIS 7. I took a screenshot of the window that popped up but lost it from the clipboard. Perhaps someone else will see it and can comment here what it says, to help those doing searches later. But as it said, after a couple of minutes it did take.)

Error on first CFM page request

But when I requested my first CFM page, I got a big ugly IIS 7 error page (an HTML page), the crux of which reported:

ASP.NET applications require migration when specifying configuration in <httpModules> or <httpHandlers>.

Yikes. It went on to provide various details on the problem as well as some workarounds. The gist was that the system.web httphandlers entry in the config files had something that was no longer compatible with the new, default "integrated mode" of IIS (defined as the "managed pipeline mode"). What had CF done? How would I best resolve it?

Quick and dirty workaround: Change mode to "classic"

One of the workarounds described changing the "mode" for the "managed pipeline mode" from "integrated" to "classic". This is defined in the site's application pool, which you can modify in the IIS manager (selecting "application pools", then the app pool (by default, the "default web site" uses "DefaultAppPool"). See the screenshot here.

Sure enough, changing it to "classic" made the problem go away, but that may not be the best solution.

Better Solution: Migrating the .NET settings in a single, simple step

I did some digging and found one blog entry with a good bit of info, and he seems to assert that this is just a breaking change in IIS 7 for ASP.NET 2.0 apps.

He also made the case for not using the workaround above (changing the mode to "classic"), as it could cause loss of many of the nifty features that IIS 7 adds. Instead, he proposed that one should instead seriously consider the option to upgrade the .NET 2.0 app config entries to work properly in integrated mode. Turns out this is just a simple command line command:

%SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/"

I had set the mode back to "integrated" to confirm that the error came back (it did), so I then dropped to the command line (using start>run and entering "cmd") and pasted that line verbatim (right-click and paste, not ctrl-v) onto the command line (again, since I'm using the "default web site"). It came back with 2 lines in response:

Successfully migrated section "system.web/httpHandlers".
Successfully migrated section "system.web/httpHandlers".

I then re-requested my CFM page, and it worked, so that seems the solution.

Since I knew I didn't have any custom-written .NET 2.0 apps on my machine, I knew there was no great risk to me doing this. (I had not myself built any .NET 2.0 apps of my own, but I may well have downloaded and installed some app that's built on it. So it's possible that if you have not, that you will not ever get this issue. I'm offering it for those who may, so they can find it on a web search.) (See my update at the top of this entry.)

The blog entry also implies that this may be an issue for SP1, so perhaps others who are not yet on SP1 won't have seen this problem yet. If anyone reads this who is not on SP1 and it solves things for you, do let us know in the comments. (Bill Staples also confirmed that this was not an issue new to SP1.)

Hope this has been helpful for someone.

PS Please, I'm not interested in any snide comments about the wisdom/folly of using Vista. Like others, I have my reasons for doing so, and I've been very satisfied with it so far. I share the above for others in the Vista boat, whether by their choice or others'.

Look ma, I'm on the radio again (my CFWeekly interview is now up)

I had the distinct pleasure of being interviewed for the second time on the ColdFusion weekly podcast (last time in Oct '06). Some may know that Matt and Peter are starting to do interviews of speakers presenting at the upcoming cf.Objective() conference, and I happened to be the first in the lineup. The interview is up as this week's podcast.

In the 45 minute talk, we discuss both talks I'll be doing at the conference, first "Hidden Gems in the CF8 Monitor" and then "Step Debugging in CF 6/7/8". The first is a condensation of my 4-part series of articles in the Adobe DevCenter, where I highlight the most compelling tips, tricks, and traps I found. I think many will be surprised by them, and in the interview I share several from the talk.

Matt also asked me about how it compares to FusionReactor and SeeFusion, and I shared my thoughts for why there's a place for all, and along those lines (of how competing things fit together), he also asked me my thoughts on the open sourcing of BD/J2EE.

Of course, one of the things I clarified was that I left New Atlanta nearly 2 years ago (next week). Many seem not to have gotten that memo! But I explain more, including why I'm not so sure it will light the world on fire as a "free CFML engine" though it may well help a lot of people, so check out the discussion if you're interested in that topic.

I also shared some news that I've never blogged about nor spoken much about: the fact that when the roles of CF Product Manager (when Tim stepped down 2 years ago) and CF Evangelist (when Ben knew a few months ago that he was moving up to lead all the Evangelists in Adobe) first became available, I had the distinct honor of having been asked first (so I was told) if I wanted those roles. It's hard for that not to sound self-aggrandizing, which is why I've not mentioned it publicly, but I mentioned it in the interview to make the point to listeners that I really am all about CF now, and that plenty of folks at Adobe did realize I was still very much a CF community guy all along.

Anyway, I explained that I didn't take the roles simply because in the first case, the product manager role, it would have involved relocation to Boston (love Atlanta's weather too much, plus I was enrolled in an Atlanta-based seminary at the time). In the second case, Ben's role, it would have been awesome, but we all know it involves a LOT of travel. My wife and I just didn't want to be apart so much and so often (and again there are those seminary studies). It was tough to say no, but as I mentioned in the interview, of course Adobe got great folks for the roles ultimately, in Jason and Adam, respectively.

The interview concluded with my discussion of the Step Debugging talk I'll give at cf.o. I explained how it will cover both the CF8 Debugger (useful only on CF8) and FusionDebug (which can run on 6, 7, and 8). I explained (as I have many times) how though they're both based on Eclipse, that needn't be a show-stopper.

I explained how FusionDebug even offers an installer that bundles Eclipse, CFEclipse, and FusionDebug all at once, which is a great help for those challenged to install it (though it's also available as an add-in). I noted that the CF8 debugger is available only as an add-in, which can be a challenge to some, but I pointed out (as I have previously) that my 25-page chapter on the CF8 debugger, in the CFWACK, is available online. That should really help those who've been challenged to get started with the CF8 debugger. Anyway, I'll explain a lot more about using the debugger, and when/why/how one should, in the talk at the conference.

So, though I didn't plan it, I guess this interview was as much a show about how I'm not any one company's guy. :-) Whether it's supporting the CF8 monitor or FusionReactor/SeeFusion, the CF8 debugger or FusionDebug, CF or the other CFML engines, or even the consulting I do (done mostly on my own, but also some for Intergral and for Universal Mind, as I mentioned), I'm out here just trying to help where I can, whoever I can, however I can. :-) I just want to share info or tools and let folks make their own decisions. (In that regard, be sure also to check out my list of 400+ tools/resources for CFers and the CF Meetup that I run.)

Anyway, it took only a few minutes for you to read this entry. I think you'll enjoy the full 45 minute version in the podcast, which you can just click here to listen to the MP3 (no need to have an Ipod!).

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.005.

Managed Hosting Services provided by
Managed Dedicated Hosting