Good day!
I've recently switched from IIS 6.0 to IIS 7.x and I'm in search of error handling technique of my dream for ASP.NET MVC 2.
What I want to achive:
Handle all unhandled exceptions in one place (preferable in Global.asax handler)
Custom handlers for 404 and 403 errors (both for MVC controller\actions and static files). These handlers should not perform rewriting and should send HTTP error codes. For example if user navigates to http://example.com/non-existing-page/ he should remain on this URL, but get HTTP 404 status and custom 404 page.
Ability to trigger 404 and 403 errors programmatically from actions. For example if user specified non-existing page number in paging, like this: http://example.com/posts/page-99999/
It will be great if this error handling will work the same for VS Development Server (I know about IIS Express, but for now I should stick to VS Dev Server)
I've used this: http://blogs.microsoft.co.il/blogs/shay/archive/2009/03/06/real-world-error-hadnling-in-asp-net-mvc-rc2.aspx while being on IIS 6.0, but now on IIS 7.0 with integrated pipeline I see IIS error messages instead of my handlers.
Thanks in advance!