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>
skyfoot
  • 20,629
  • 8
  • 49
  • 71

2 Answers2

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.

Jim Geurts
  • 20,189
  • 23
  • 95
  • 116
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

Karanvir Kang
  • 2,179
  • 19
  • 16