This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

NotFoundResponseExtensions Pennington.Infrastructure

Lets a content-resolving page signal that the requested route is missing. The marker is read by NotFoundStatusProcessor, which flips the status to 404 after the rendered 404 body (with its layout and chrome) has been produced — so pages set the marker instead of writing StatusCode directly.

Methods

IsMarkedNotFound

#
public static bool IsMarkedNotFound(HttpContext context)

Returns true when MarkNotFound has been called for this request.

Parameters

context HttpContext

Returns

bool

MarkNotFound

#
public static void MarkNotFound(HttpContext context)

Marks the current request as having resolved to a missing route.

Parameters

context HttpContext

Pennington.Infrastructure.NotFoundResponseExtensions

namespace Pennington.Infrastructure;

/// Lets a content-resolving page signal that the requested route is missing. The marker is read by NotFoundStatusProcessor, which flips the status to 404 after the rendered 404 body (with its layout and chrome) has been produced — so pages set the marker instead of writing StatusCode directly.
public class NotFoundResponseExtensions
{
    /// Returns true when MarkNotFound has been called for this request.
    
public static bool IsMarkedNotFound(HttpContext context)
; /// Marks the current request as having resolved to a missing route.
public static void MarkNotFound(HttpContext context)
; }