Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 500 on IIS 8/8.5 with ColdFusion 10/11

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:

  • IIS error: http://www.example.com/index.cfm
  • IIS error: http://www.example.com/foobar.cfm
  • Coldfusion error: http://www.example.com/

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.

like image 707
android Avatar asked May 06 '14 13:05

android


People also ask

How do I resolve 500 Internal server error in IIS?

IIS error The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.

How do I fix error request failed with status code 500?

Most of the time, the issue is only temporarily and can be corrected by trying the page again. You can use the refresh/reload button, pressing F5 , or by trying the URL again from the address bar. Sometimes this error is caused when a service restarts, and you happen to catch it at exactly the wrong time.

What does the 500 internal server error code mean in IIS website?

HTTP Error 500 message indicates that a problem has occurred on the Web server that hosts the Web site at the time the error is returned.


1 Answers

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.

like image 65
android Avatar answered Oct 04 '22 03:10

android