In my exception handling file, I set a statuscode to 404 and then render n HTML page, for the error page (think fail-whale).
<cfheader statuscode="404" statustext="Application Exception">
<html><head><title>Error</title></head><body><h1>There was an error yo!</h1></body></html>
This is obviously over simplified, but just to make sure everything was demonstrated.
What I have found is that from a ASP.NET request, they can set a variable "Response.TrySkipIisCustomErrors=true" to keep IIS from showing its own error page.
How can someone in Coldfusion do it / how can I just tell IIS to stop its thinks it knows better than me shenanigans.
This might help:
For more information:
If that doesn't work then you might try writing a .NET
HttpModule
to plug into the IIS request/response pipeline to setResponse.TrySkipCustomErrors
. Not ideal.ASP.NET's worker request object calls an exported function called
MgdSetStatusW
. The problem here is that unless Coldfusion exposes this flag then you won't be able to set the value directly in CF.Poking around with .NET Reflector I seen ASP.NET setting the response status using: