locked
Error Pages: web.config httpErrors conditional on errorMode? RRS feed

  • Question

  • User-1882172298 posted

    How can I make existingResponse conditional on the errorMode?

    For example, If errorMode="DetailedLocalOnly" then I want external messages to be "replaced" by my custom definitions i.e. a Friendly error page, but I want local messages to be "passedThrough". So, for a 500 error I see the YSOD locally, not the IIS 500 error page. Externally I would see my Friendly error page.

    Is this possible?

    my current configuration:

    <httpErrors existingResponse="Replace" errorMode="DetailedLocalOnly">
        <remove statusCode="500" />
        <error statusCode="500" path="/myCustomErrorPage" responseMode="ExecuteURL" />
    </httpErrors>


    Tuesday, May 7, 2013 3:26 AM

Answers

  • User1196771204 posted

    hi shearer,

    I do not think you can achieve the same things on the same time. If you want to show up the friendly-error message, both you and your clients will see this friendly error message. However, obviously, you can set the error message to be sent to you so that you are aware that one part of your site is not working. However, you will still see the same friendly error message.

    Hope this helps.

    Please mark this response as an "answer" if it helps you. Thanks heaps! 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2013 12:49 AM

All replies

  • User-1882172298 posted

    It surprises me that one or the most common scenarios that should be supported doesn’t seem to be. Ie. I want my customers to see a friendly error page, but I want to be able to see the actual YSOD without needing to change config.

    Tuesday, May 7, 2013 3:28 AM
  • User1196771204 posted

    hi shearer,

    I do not think you can achieve the same things on the same time. If you want to show up the friendly-error message, both you and your clients will see this friendly error message. However, obviously, you can set the error message to be sent to you so that you are aware that one part of your site is not working. However, you will still see the same friendly error message.

    Hope this helps.

    Please mark this response as an "answer" if it helps you. Thanks heaps! 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2013 12:49 AM