Simple question: If I’ve got a generic Error.aspx page in my Shared folder (and the requisite HandleError on my controller). How do I show the exception message that triggered it?
This Scott Gu post states that the functionality should be in the default Error.aspx generated with new projects, but that was Preview 4, and I’m assuming that fell out with the v1.0 release.
ASP.NET MVC HandleError Attribute, Custom Error Pages and Logging Exceptions
ASP.NET has a nice web.config setting that configures custom errors. This property is exposed via MVC, so we can set up our config to show friendly errors to remote users only: