Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3241882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:15:00+00:00 2026-05-17T18:15:00+00:00

In my exception handling file, I set a statuscode to 404 and then render

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:15:01+00:00Added an answer on May 17, 2026 at 6:15 pm

    This might help:

    <configuration>
      <system.webServer>
        <httpErrors existingResponse="PassThrough" />
      </system.webServer>
    </configuration>
    

    For more information:

    HTTP Errors (IIS.NET)
    What to expect from IIS7 custom error module (IIS.NET)

    If that doesn’t work then you might try writing a .NET HttpModule to plug into the IIS request/response pipeline to set Response.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:

    [DllImport("webengine4.dll", CharSet=CharSet.Unicode)]
    internal static extern int MgdSetStatusW(IntPtr pRequestContext, 
        int dwStatusCode, int dwSubStatusCode, string pszReason, 
        string pszErrorDescription, bool fTrySkipCustomErrors);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an error logging set of classes which will log to file,
Can you help me fix the exception/error message handling in my control architecture script?
I am implementing exception handling for our BizTalk services, and have run into a
Question: Is exception handling in Java actually slow? Conventional wisdom, as well as a
For testing exception handling in the case of a broken connection it is useful
I know two approaches to Exception handling, lets have a look at them. Contract
Most program languages have some kind of exception handling; some languages have return codes,
I recently read Object Oriented Exception Handling in Perl Perl.com article. Is there any
I've never been completely happy with the way exception handling works, there's a lot
I admit it: I don't bother with too much exception handling. I know I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.