Skip to main content
Participant
October 16, 2009
Answered

Mapping .CHTML extension to Coldfusion in IIS6 / CF9

  • October 16, 2009
  • 1 reply
  • 2622 views

Hey All -

I won't go into the details of my support experience trying to resolve this with Adobe Tech Support/Customer Service.  Suffice it to say, the Adobe Support/Service is horrific.  It's absolutely mind-boggling to me that a company can provide such horrible support.

Here's my question...

I need to map the .CHTML file extension so that it is processed by Coldfusion.   I'm setting up a brand new server with Windows 2003 R2 Standard (64-bit) and Coldfusion 9 (64-bit).   I do the Coldfusion install with no problems (choosing IIS).    I can get into the Coldfusion Admin and all of my .CFM pages work fine.   I then run the following wsconfig command to add the .CHTML mapping:

2.jpg

"wsconfig -ws iis -site XXXXXXX -map .chml -host 172.16.110.1 - server coldfusion"

Looks good so far, right?   If I go into IIS and under the site look at the mappings, I even see:

3.jpg

Alrighty - so wsconfig is configured and talking to Coldfusion and my .CHTML to jrun_iis6.dll mapping has been automatically created.   Things should work now, right?   Here's what I get when I try to open any .CHTML pages:

4.jpg

"Either the Macromedia application server(s) are unreachable or none of them has a mapping to process this request."   Keep in mind, if I rename this page from .CHTML to .CFM the page loads fine, so I know it's not anything else (e.g. datasources or other coldfusion settings).

So now I'm stuck...  I've found some sites that say I need to edit the wwwroot\WEB-INF\web.xml file to add mappings, but that didn't make a difference either (same exact error).  I've also found some sites that say I need to have a JRUNScripts virtual directory in each site (what I've found is that when I install/uninstall Coldfusion (which I've now done more than a dozen times) the virtual directory in question is automatically created about 10% of the time).  However, no matter what I do, I can't get it to work.

Any help is greatly appreciated...

thanks!

    This topic has been closed for replies.
    Correct answer Ken_Ford_-_ACP-QFo4AB

    Have you tried this?

    http://www.talkingtree.com/blog/index.cfm/2006/2/17/CF-Custom-File-Extensions

    And when you installed CF did your IIS have IIS 6 Metabase compatibility enabled?

    http://forums.iis.net/t/1142872.aspx

    Ken Ford

    1 reply

    Ken_Ford_-_ACP-QFo4AB
    Ken_Ford_-_ACP-QFo4ABCorrect answer
    Inspiring
    October 16, 2009

    Have you tried this?

    http://www.talkingtree.com/blog/index.cfm/2006/2/17/CF-Custom-File-Extensions

    And when you installed CF did your IIS have IIS 6 Metabase compatibility enabled?

    http://forums.iis.net/t/1142872.aspx

    Ken Ford

    babyky2kAuthor
    Participant
    October 16, 2009

    I have tried what is in http://www.talkingtree.com/blog/index.cfm/2006/2/17/CF-Custom-File-Extensions.  In fact, that's pretty much exactly what I did.   Just for kicks, I went ahead and deleted my existing config through wsconfig and ran this:

    %CFUSION_HOME%\runtime\bin\wsconfig -server coldfusion -ws IIS -site 0 -coldfusion -cfwebroot -map ".chtml" -v

    This completed successfully.   If I look at my C:\ColdFusion9\runtime\lib\wsconfig\wsconfig.properties file, I see:

    ----

    #JRun/ColdFusion MX Web Server Configuration File

    #Fri Oct 16 12:27:26 PDT 2009

    1=IIS,0,false,".chtml"

    1.srv=localhost,"coldfusion"

    1.cfmx=true,C:/Inetpub/wwwroot

    -----

    I also updated the web.xml file, here is the pertinent section:

    <servlet-mapping>

    <servlet-mapping id="coldfusion_mapping_15">

    <servlet-name>CfmServlet</servlet-name>

    <url-pattern>*.chtml</url-pattern>

    </servlet-mapping>

    <servlet-mapping id="coldfusion_mapping_16">

    <servlet-name>CfmServlet</servlet-name>

    <url-pattern>*.chtml/*</url-pattern>

    </servlet-mapping>

    Yet I still get "Either the Macromedia application server(s) are unreachable or none of them has a mapping to process this request" (even after restarting the services and rebooting).

    As for the IIS6 Metabase compatibility (http://forums.iis.net/t/1142872.aspx) I'm running Windows 2003 R2, not Windows 2008.  Windows 2003 R2 uses IIS6 so that article doesn't really apply (although the guy there appears to have had the exact same problem that I'm having!).

    Any other ideas?

    thanks!

    babyky2kAuthor
    Participant
    October 16, 2009

    The only other suggestion I have is to restart IIS and ColdFusion, maybe even reboot the server

    Ken Ford


    I actually think I might have made some progress here...

    The original article talked about updating the web.xml file.  However, I think I was updating it wrong.  I did this:

    <servlet-mapping>

      <servlet-mapping id="coldfusion_mapping_15">

      <servlet-name>CfmServlet</servlet-name>

    <url-pattern>*.chtml</url-pattern>

    </servlet-mapping>

    <servlet-mapping id="coldfusion_mapping_16">

      <servlet-name>CfmServlet</servlet-name>

      <url-pattern>*.chtml/*</url-pattern>

    </servlet-mapping>

    ...I think I should have done this:

    <servlet-mapping>

      <servlet-name>CfmServlet</servlet-name>

      <url-pattern>*.htm</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

      <servlet-name>CfmServlet</servlet-name>

      <url-pattern>*.htm/*</url-pattern>

    </servlet-mapping>

    I had read somewhere else that you needed to have a servlet-mapping id, but I guess that was wrong.  I took those out and now I'm one step farther (although still getting a different error now).

    Working on it...  thanks for your help!