Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
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'.