Is it possible, and if so how do you return the standard Umbraco 404 error from a RenderMvcController? This beautiful bad boy:
In my scenario, I am using a UmbracoVirtualNodeRouteHandler to handle a custom route. A RenderMvcController is responsible for pulling the content from a remote API via ID. If the content doesn't exist, I'd like to return the same 404 page generated by normal Umbraco routing.
Here's how I'm currently doing it. This returns an IIS error page though.
var remoteContent = await _service.Get(id);
if (remoteContent == null) return new HttpNotFoundResult();
Return Umbraco 404 from RenderMvcController
Hi guys,
Is it possible, and if so how do you return the standard Umbraco 404 error from a RenderMvcController? This beautiful bad boy:
In my scenario, I am using a UmbracoVirtualNodeRouteHandler to handle a custom route. A RenderMvcController is responsible for pulling the content from a remote API via ID. If the content doesn't exist, I'd like to return the same 404 page generated by normal Umbraco routing.
Here's how I'm currently doing it. This returns an IIS error page though.
Any help is greatly appreciated. TIA!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.