开发者

MVC Exception Handling Display Custom View Not Working in IE Only

I'm working with MVC 3 and have encountered a strange error. I have customErrors='On' and the standard Error.cshtml view in the Shared Views folder. I'm throwing a deliberate exception to test this.

In FireFox my view is displayed with the cust开发者_运维知识库om error message. However, in IE the view is not displayed and instead I see a generic HTTP 500 Internal Server Error Page - The website cannot display the page displayed.

Does anyone know why this works in FireFox but not IE ?


Internet explorer has an option (checked by default) to hide 50x errors. It's called "Show friendly HTTP error messages", and you can uncheck it by going to "Internet Options" > "Advanced". When checked, IE shows the page you are seeing, instead of the one returned by the server.

Apparently, you can override this behaviour if the content returned by the server is big enough (!!), as you can see in the following document by MS (Method 2): http://support.microsoft.com/kb/294807/en-us

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜