httpErrors在本地计算机上显示500错误而不是YSOD

sky*_*oot 5 asp.net error-handling webforms ysod

httpErrors在我的网站web.config中使用来处理404错误.在我添加existingResponse="Replace"到节点之前这没有正常工作,但现在我在本地开发机器上没有出现任何黄色的死亡错误屏幕.

<httpErrors errorMode="Custom" existingResponse="Replace" >
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/error.aspx?c=404" responseMode="ExecuteURL" />
 </httpErrors>
Run Code Online (Sandbox Code Playgroud)

Jim*_*rts 7

尝试将existingResponse值更改为Auto.这对我有用.我现在能够使用自定义404页面,同时还能看到死亡错误的黄色屏幕.