httpErrors在本地机器上显示500错误而不是YSOD [英] httpErrors shows 500 error instead of YSOD on local machine
本文介绍了httpErrors在本地机器上显示500错误而不是YSOD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的网站web.config中使用 httpErrors
来处理404错误。在我将本地开发机器上的$ code> existingResponse =Replace添加到节点之前,现在我没有得到任何黄色的死亡错误屏幕。
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>
推荐答案
尝试更改 existingResponse
value to Auto
。这对我有用我现在可以使用自定义的404页面,同时也看到黄色屏幕的死亡错误。
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.
这篇关于httpErrors在本地机器上显示500错误而不是YSOD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文