IISExpress garbled HTTP 500 error message

僤鯓⒐⒋嵵緔 提交于 2019-12-06 10:05:16

I eventually found out that this was caused by the application sending GZipped contents without the header that indicated to the browser that is was in fact GZipped, so it just dumped the binary content out. I got round this by adding the following to my Global.asax

Sub Application_Error()
    Response.Filter = Nothing
End Sub

This will strip the filter out of the response when an error occurs, and my error message appears.

All credit to Rick Strahl with this blog post for the workaround. It's not ideal but it works for me and that's all I am really bothered about right now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!