I have this simple code in Coldfusion
<cfheader
statuscode="400"
statustext="There was something wrong with the request."
/>
<cfoutput>This is what I want to return as the output.</cfoutput>
<cfabort>
When I run this on my localhost running CF10, I get this output on my Chrome browser:
But when I run this same file on another server running CF11, I get this output:
Am I missing something? Is there some other way of doing this in CF11? Any help would be really appreciated. Thanks.
The issue actually has nothing to do with ColdFusion, either 10 or 11.
By default, IIS shows not does not show the statustext
portion of the error message; it only shows the statuscode
number. This is a security feature to prevent data leakage. If you do want to show the statustext
portion of the error message, that is called "Detailed Error Messages" in IIS.
Steps to enable Detailed Error Messages in IIS 7:
More information: