Info
Version: | 1.0.2 |
Author(s): | Knowit Experience Bergen / Håvard Olsen |
Last Update: | Thursday, August 3, 2017 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/KXB.Umbraco.NotFoundHandler |
Install
Install-Package KXB.Umbraco.NotFoundHandler
dotnet add package KXB.Umbraco.NotFoundHandler
paket add KXB.Umbraco.NotFoundHandler
KXB.Umbraco.NotFoundHandler Download (Unzip the "nupkg" after downloading)
Dependencies
- ClientDependency(>= 1.9.2)
- log4net(>= 2.0.8)
- Microsoft.AspNet.Mvc(>= 5.2.3)
- Microsoft.Owin(>= 3.0.1)
- Microsoft.Owin.Security(>= 3.0.1)
- Microsoft.Owin.Security.Cookies(>= 3.0.1)
- Microsoft.Owin.Security.OAuth(>= 3.0.1)
- Newtonsoft.Json(>= 10.0.2)
- UmbracoCms.Core(>= 7.6.4)
Tags
This allows us to use actual umbraco content as content for our 404 page.
Getting started:
Web.config:
- Add httpErrors existingResponse="PassThrough" to the webServer section of your webconfig.
Global.asax:
- We need to register the handler with umbraco's ContentResolver.
- Add following line to the OnApplicationStarting method in your Global.asax.cs
** ContentLastChanceFinderResolver.Current.SetFinder(new KXB.Umbraco.NotFoundHandler.NotFoundHandler()); **
To implement a custom handler it is possible to override the NotFoundHandler.TryFindContent(PublishedContentRequest contentRequest) method.
=========================================================================
This package is part a set of smaller modules that I have found useful when working with umbraco.
Other packages include:
- KXB.Umbraco.RouteHijacking
- KXB.Umbraco.Search.