Custom error pages with httpErrors

Since IIS 7, you can define custom error pages using the httpErrors node in Web.config.

This lets you catch errors in a SEO-friendly fashion from both inside (e.g. application exceptions) and outside (e.g. IIS request validation failures) your application without having error-handling code everywhere.

Take a look at Web.config and ErrorsController.cs to learn more.

You aren't allowed here

Generate a HTTP 403 error.

Forbidden! »

This is broken

Generate an application exception.

Internal Server Error! »

There's nothing here

Generate a HTTP 404 error.

Not Found! »