Skip to content

Provides a user-friendly '404' page whenever a controller, action or route is not found in your ASP.NET MVC3 application. A view called NotFound is rendered instead of the default ASP.NET error page.

Notifications You must be signed in to change notification settings

Kazzje/NotFoundMvc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotFoundMvc

by Andrew Davey - https://aboutcode.net/ - [email protected]

Provides a user-friendly '404' page whenever a controller, action or route is not found in your ASP.NET MVC3 application.
A view called NotFound is rendered instead of the default ASP.NET error page.

Add via nuget using:
Install-Package NotFoundMvc

Take a look at the sample application for basic usage. Essentially you just have to reference the NotFoundMvc assembly and add a NotFound view to your app.

NotFoundMvc automatically installs itself during web application start-up. It handles all the different ways a 404 HttpException is usually thrown by ASP.NET MVC. This includes a missing controller, action and route.

A catch-all route is added to the end of RouteTable.Routes.
The controller factory is wrapped to catch when controller is not found.
The action invoker of Controller is wrapped to catch when the action method is not found.

About

Provides a user-friendly '404' page whenever a controller, action or route is not found in your ASP.NET MVC3 application. A view called NotFound is rendered instead of the default ASP.NET error page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published