I sent this email out yesterday as part of the Flextras/DotComIt newsletter. I thought I'd repost it here.

I recently had the opportunity to move some of my hosted sites to Amazon web services. The Flextras site, The Flex Show, and my personal blog, are now all hosted on EC2. It has been a few years since I've had to deal with my own production server maintenance; and I came across a weird issue with IIS7 and ColdFusion 9. I thought I'd describe the issue and explain my solution.

IIS6 Compatibility is turned on

Normally, when you create a new instance of an IIS web server, you'll need to associate ColdFusion with it. ColdFusion provides a tool named the Web Server Configuration Tool that can attach an instance of ColdFusion with an instance of IIS. If you happen to be using ColdFusion 9.02--or later--and IIS7; you may receive this error:

The Web Server Configuration Tool will not work with IIS7 if IIS6 Management Compatibility is enabled. On this particular server, the management compatibility was enabled for the FTP plugin could be managed on the server. I did not want to uninstall the IIS management compatibility if I could avoid it. How could I tell IIS7 that it should send .cfm requests to ColdFusion for processing without using the Web Server Configuration Tool?

Editing the applicationHost.config file

Under the hood the mappings that tell IIS7 how to communicate with ColdFusion are in a file named applicationHost.config. You can find this file in the 'C:\Windows\System32\inetsrv\config\' directory. This file contains a lot of configuration for IIS7.

If IIS7 was already installed when ColdFusion was initially installed, then you can find a section that references an existing IIS7 instance with your existing ColdFusion instance. Look for something like this:

view plain print about
1<location path="iisInstanceName">
2<system.webServer>
3<handlers>
4<clear />
5<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
6<add name="CGI-exe" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
7<add name="AboMapperCustom-130401" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll" requireAccess="None" responseBufferLimit="0" />
8<add name="AboMapperCustom-130411" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
9<add name="AboMapperCustom-130412" path="*.jws" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
10<add name="AboMapperCustom-130413" path="*.cfm" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
11<add name="AboMapperCustom-130414" path="*.cfml" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
12<add name="AboMapperCustom-130415" path="*.cfc" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
13<add name="AboMapperCustom-130416" path="*.cfr" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
14<add name="AboMapperCustom-130417" path="*.cfswf" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
15<add name="AboMapperCustom-130418" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
16<add name="AboMapperCustom-130419" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" requireAccess="Script" responseBufferLimit="0" />
17<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
18<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
19<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
20</handlers>
21</system.webServer>
22</location>

If you're using CF Standard, you can just copy and paste this section; then change the path name on the location to be the name of your new IIS7 server instance. Restart your IIS instance and that should be all you need. Otherwise, you'll have to create the above section manually; by copying and pasting from above and changing your paths to relate to your own CF Install.

Although I didn't have the experience of setting this up using CF Enterprise, I expect the procedure will be similar; you'll just need to point to the jrun_iis6.dll for your specific instance of ColdFusion.