0

We have a custom pipeline 404 processor, inside that processor, we do not set status code to 404, instead, we set Response.TrySlipIisCustomErrors = true and also set Sitecore.Context.Item = item404; the item404 is retrieved depends on the url patterns, so we have several custom 404 pages.

This works fine if the item requested is not found from Sitecore, but it does not work in one of our video page, because the page /video/id always exists so it does not trigger 404 if the video id passed in does not exist.

I tried to add code return HttpNotFound() from controller, it does not seem to trigger the custom 404 processor. what is the way to trigger custom 404 pipeline processor inside the controller code? I need to do that if the video id could not be found from search service.

Thank you very much!

0

0

Browse other questions tagged or ask your own question.