Error 500 on IIS 8/8.5 with ColdFusion 10/11
Asked Answered
L

1

7

If I have an error in my ColdFusion script, I'm getting a 500 error message from IIS instead of ColdFusion. This only happens if I provide the file name in the URL and does not happen if I open the URL without the script name (which would open index.cfm).

For example:

I can reproduce this problem on 2 of my 3 ColdFusion platforms:

  • Working: IIS 7.5 with ColdFusion 10 Update 12 (with updated connector)
  • Not Working: IIS 8 with ColdFusion 10 Update 12 (with updated connector)
  • Not Working: IIS 8.5 with ColdFusion 11

My index.cfm & foobar.cfm:

<!--- provoke a coldfusion error --->
<cfset foo

My web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Custom" existingResponse="PassThrough" />
    </system.webServer>
</configuration>

For me it looks like there's a problem with the ColdFusion connector with IIS 8 and IIS 8.5.

Littman answered 6/5, 2014 at 13:8 Comment(2)
Are you seeing anything in your application.log?Terenceterencio
Yes I can find the ColdFusion error which I have provoked. ColdFusion throws the correct error but IIS ignores it.Littman
L
6

Okay, I was finally able to fix this.

The problem

I run multiple web applications each in a own virtual directory under the same IIS website. It turned out that adding existingResponse="PassThrough" to the web.config only works partially in virtual directories. Without that setting I never get any ColdFusion error and instead I always see the IIS 500 error. If I add existingResponse="PassThrough" in the web.config of a virtual directory, ColdFusion errors are only forwarded if you access the site without calling a .cfm script directly (for example: example.com/ instead of example.com/index.cfm).

The solution

The solution was easy. I just had to add the existingResponse="PassThrough" setting to the web.config of the root IIS website aswell and everything is working.

I think this is a bug in IIS 8 and 8.5 since I double checked that on my IIS 7.5 server and I didn't had to add the property on the root website.

Littman answered 7/5, 2014 at 18:58 Comment(1)
While this appears to solve the problem for me too, it has the unacceptable side effect of also effectively disabling my custom 404 error handler script that's configured in IIS to execute /error_404.cfmMcintire

© 2022 - 2024 — McMap. All rights reserved.