1. Howto force error 500 to enable testing the error output and logging:
Navigate to site root or a page with ?someParam=<script> (note: this will be treated a a dangerour script and error 500 thrown).
2. MVC Web.config
The params errorMode & existingResponse behave so:
Custom + Auto = Serves the detailed error YSOD page, useful for debugging.
Custom + Replace = Serves the page configured here 500.html (or the one setup in IIS if not set in config). Hides error details, not so useful for debug, potentially useful for production envs.
Can use DetailedLocalOnly instead of Custom for similar effect.
Note: Elmah fails to log error 500 for some reason. We might be able to make it work by redirecting to an Error action (or Error.aspx)
Disclaimer: No warranties attached, please use own judgement and analysis.