httpErrors shows 500 error instead of YSOD on local machine
Asked Answered
C

2

5

I am using httpErrors in my sites web.config to handle 404 errors. This was not working correctly until I added existingResponse="Replace" to the node but now I dont get any yellow screen of death errors on my local development machine.

<httpErrors errorMode="Custom" existingResponse="Replace" >
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/error.aspx?c=404" responseMode="ExecuteURL" />
 </httpErrors>
Cormophyte answered 21/5, 2012 at 10:1 Comment(1)
Anyone want to try this and tell me if they get the same issue when there is an exception?Cormophyte
N
8

Try changing the existingResponse value to Auto. That worked for me. I'm now able to use a custom 404 page, while also seeing the yellow screen of death errors.

Nursemaid answered 15/7, 2012 at 22:50 Comment(1)
Thanks mate! NB when setting http errors through IIS it is set to "Replace" for youMentholated
C
0

You should set the errorMode attribute to DetailedLocalOnly. This will allow you to see YSOD on local environment and httpErrors when accessing your website from remote machine

Crocodilian answered 9/6, 2015 at 19:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.