Reputation: 652
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:
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.
Upvotes: 7
Views: 5721
Reputation: 652
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.
Upvotes: 6