1

Running ColdFusion 9,0,1,274733 on JRun (J2EE install), Windows Server 2008 R2, Java 1.6.0_22

Has anyone else had a problem getting the default document, index.cfm, to work with ColdFusion? I'm assuming that this is only an issue because of our setup; different web server (IIS) and application server (ColdFusion). I can't imagine we are the only ones running this configuration. Are we?

So here is the issue.
If we request http://mysite.com/index.cfm it works.
If we request http://mysite.com/ it does not work and we get a 404.

I checked the web connector's log file on our IIS server and can see that it is sending the request to our ColdFusion server. The ColdFusion server is sending back the 404 error code but I can't figure out why. We have the default document set on our IIS server for index.cfm. We also have the <welcome-file-list> set to include index.cfm on our application server (web.xml).

From our web connector's log when we do NOT include index.cfm:

2012-11-01 13:37:22 jrISAPI[4544:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/"
2012-11-01 13:37:22 jrISAPI[4544:3600]     HTTP_HOST: servername
2012-11-01 13:37:22 jrISAPI[4544:3600]  filtering /test/ (/test/) HOST=servername
2012-11-01 13:37:22 jrISAPI[4544:3600]  filterRequest:   no match
2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl: request received: URL=/test/
2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl Completion: 404, ErrorCode=2, URL=/test/.

From our web connector's log when we do include index.cfm:

2012-11-01 13:49:02 jrISAPI[9936:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/index.cfm"
2012-11-01 13:49:02 jrISAPI[9936:3600]     HTTP_HOST: servername
2012-11-01 13:49:02 jrISAPI[9936:3600]  filtering /test/index.cfm (/test/index.cfm) HOST=servername
2012-11-01 13:49:02 jrISAPI[9936:3600]  filterRequest:   matched *.cfm
2012-11-01 13:49:02 jrISAPI[9936:3600]  ***IISWorkerThreadProc for JRun ISAPI Extension: uri is "/test/index.cfm"
2012-11-01 13:49:02 jrISAPI[9936:3600]     ALL_RAW: Connection: Keep-Alive
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application (553)
2012-11-01 13:49:02 jrISAPI[9936:3600]  Headers and Values:
... and much more ...

We have gotten around this issue by using the URL Rewrite module in IIS to append index.cfm to the URL. It works but my gut keeps telling me that we should not need to do that for such basic functionality.

Is anyone else having this issue? How have you gotten around this?

EDIT adding some more info

Here is my site's web.config file contents from the IIS server:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <handlers>
        <add name="JWildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\1\jrun_iis6_wildcard.dll" resourceType="Unspecified" requireAccess="None" />
        <add name="hbmxmlHandler" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfswfHandler" path="*.cfswf" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfrHandler" path="*.cfr" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfcHandler" path="*.cfc" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfmlHandler" path="*.cfml" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfmHandler" path="*.cfm" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="jwsHandler" path="*.jws" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="jspHandler" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
    </handlers>
    <defaultDocument>
        <files>
            <add value="index.cfm" />
        </files>
    </defaultDocument>
    <staticContent>
        <mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package zip" />
    </staticContent>
</system.webServer>
</configuration>

Here is some of the file contents from the APP server web.xml:

<welcome-file-list id="WelcomeFileList_1034546870672">
    <welcome-file>index.cfm</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
</welcome-file-list>
Miguel-F
  • 13,450
  • 6
  • 38
  • 63
  • Some more clarification, Adobe's terminology for this setup is 'distributed mode'. When there is one web server and another, different, ColdFusion server. – Miguel-F Nov 02 '12 at 12:29
  • I'm not sure why people are down-voting this question, especially after all of this time. Could you please post a comment about why you are down-voting? – Miguel-F Jul 09 '13 at 16:58

4 Answers4

1

Within IIS Manager try adding a default document of "index.cfm" for your website.

Sam Farmer
  • 4,108
  • 17
  • 20
  • Thanks for the answer. I have already done that. Actually, the web connector tool does this for you but I have verified that it exists for my website. I have noticed however that the request through the web connector does not have 'index.cfm' appended to it. I'm not sure if that is how it is supposed to work or not. I would think that the web.xml's 'welcome-file-list' would take over at that point but it does not appear to be. – Miguel-F Nov 01 '12 at 20:19
1

I had the same problem after upgrading CF from 2016 to 2018 / 2021. The solution is this: open IIS Manager and go to Handler Mappings. Here, search for cfcHandler, cfmHandler, cfmlHandler entries and right click, edit them and you will probably see something like this: C:\ColdFusion2021\config\wsconfig\1\isapi_redirect.dll

Make sure the path is updated to the current version of the ColdFusion server. In my case it was still trying to access ColdFusion2016 folder even if I updated to 2021.

This solved the problem for me.

  • After hours of searching, this was IT! We just moved from 2021 to 2023 and on one of our servers the connector didn't full uninstall. The process must have broken. We had to manually remove the isapi redirect lines in system32 AND this. But that did it. THANK YOU! – henonChesser May 31 '23 at 21:47
0

I also posted this question on the Adobe forums and it has gained more traction over there. You can read all of the details here.

It seems like the main issue I was having is that IIS was not passing '/index.cfm' to the web connector once it had determined that ColdFusion had no mapping for '/'. This began working after I created a blank (empty) index.cfm file on the web server. I do not recall having to place the CFM files on the web server when using distributed mode in the past. Can anyone confirm or deny that the CFM files need to reside on both servers for this to work (without using rewrite rules anyway)?

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
0

I'm a bit late to the party on this one, but I've been working on a system where I need to switch between CF8 & CF10 on the same dev server pretty frequently so I've been working on a batch file to run wsconfig to save myself some effort and I ran into the same issue. CF working fine but never processing index.cfm for / - as above, all the mappings appeared to be set up correctly.

I found that wsconfig works much more reliably if you add each site my name rather than using "-site 0"

So, for example, to manually remove and reinstall the connectors for two sites running on IIS

set CFUSION_HOME=C:\ColdFusion10\cfusion
%CFUSION_HOME%\runtime\bin\wsconfig -uninstall 
net start "ColdFusion 10 Application Server"
%CFUSION_HOME%\runtime\bin\wsconfig -ws IIS -site "Default Web Site"
%CFUSION_HOME%\runtime\bin\wsconfig -ws IIS -site "My Website Name"