If I start with a new MVC 5 project, in web.config setting customErrors mode="on" allows the shared view 'Error.cshtml' to show when I force (raise) an exception, but it only shows the following text...
Error.
An error occurred while processing your request.
How do I pass information to this view to display more relevant info, such as what error occurred? Can I use this view if I use the Global.asax method...
protected void Application_Error()
?
Override the filter:
Declare the model at the top of the 'error' view:
Then use on the page like so:
Hope this helps.