HttpErrors shows error 500 instead of YSOD on local machine

I use httpErrorsweb.config on my sites to handle 404 errors. This does not work correctly until I added existingResponse="Replace"to node, but now I do not get a 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>
+5
source share
2 answers

Try changing the value existingResponseto Auto. It worked for me. Now I can use a custom 404 page and also see a yellow screen of death errors.

+6
source

You must set the attribute errorModeto DetailedLocalOnly. This will allow you to see YSOD in the local environment and httpErrors when accessing your site from a remote machine.

0

All Articles