WorldDirect.HealthChecks.MiniUI 0.2.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package WorldDirect.HealthChecks.MiniUI --version 0.2.0
                    
NuGet\Install-Package WorldDirect.HealthChecks.MiniUI -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WorldDirect.HealthChecks.MiniUI" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WorldDirect.HealthChecks.MiniUI" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="WorldDirect.HealthChecks.MiniUI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WorldDirect.HealthChecks.MiniUI --version 0.2.0
                    
#r "nuget: WorldDirect.HealthChecks.MiniUI, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WorldDirect.HealthChecks.MiniUI@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WorldDirect.HealthChecks.MiniUI&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=WorldDirect.HealthChecks.MiniUI&version=0.2.0
                    
Install as a Cake Tool

HealthChecks.MiniUI

HealthChecks.MiniUI is a tiny ASP.NET Core health page helper that renders a human-friendly HTML status page on top of Microsoft health checks.

What it does

  • Keeps your machine endpoint separate from the human UI
  • Renders health checks as a simple HTML page
  • Shows status, description, duration, tags, and exception details
  • Uses the existing Microsoft health check pipeline

How it looks

These screenshots are taken from the demo application.

Dark mode Light mode Exception pop-out
Dark mode Light mode Exception pop-out

Installation

Install the package from NuGet:

dotnet add package WorldDirect.HealthChecks.MiniUI

Basic usage

Map the page in your app startup code:

// Microsoft.Extensions.HealthChecks
app.MapHealthChecks("/healthz");

// MiniUI HealthCheck page
app.MapSimpleHealthPage("/health-ui", options =>
{
    options.Title = "My App Health";
});

Response status codes

By default, the page returns HTTP 200 for all overall health states (Healthy, Degraded, Unhealthy).

You can override this per status:

using Microsoft.AspNetCore.Http;

app.MapSimpleHealthPage("/health-ui", options =>
{
    options.StatusCodes.Healthy = StatusCodes.Status200OK;
    options.StatusCodes.Degraded = StatusCodes.Status200OK;
    options.StatusCodes.Unhealthy = StatusCodes.Status503ServiceUnavailable;
});

Example for dynamic response

If you want a single entry URL, you can dispatch based on the Accept header: Browsers typically include text/html on page navigation, so interactive users will see the UI automatically.

  • /health with Accept: text/html → MiniUI endpoint (/health-ui)
  • /health with other Accept values → machine endpoint (/healthz)
// Custom Middleware for Accept header based routing
app.Use(async (context, next) =>
{
    if (context.Request.Path == "/health")
    {
        var accept = context.Request.Headers.Accept.ToString();
        var wantsHtml = accept.Contains("text/html", StringComparison.OrdinalIgnoreCase);

        // Internal server-side rewrite for this request (no 3xx redirect to the client).
        context.Request.Path = wantsHtml ? "/health-ui" : "/healthz";
    }

    await next();
});

// Required in this setup so endpoint routing sees the rewritten /health path.
app.UseRouting();

app.MapHealthChecks("/healthz");

app.MapSimpleHealthPage("/health-ui", options =>
{
    options.Title = "My App Health";
});

Demo app

The repository includes a small demo app in demo/HealthChecks.MiniUI.Demo.

Run it from the repo root:

dotnet run --project demo/HealthChecks.MiniUI.Demo/HealthChecks.MiniUI.Demo.csproj

Then open:

  • /health as the dynamic entry URL (UI for browser requests, machine response for non-HTML Accept headers)
  • /health-ui for the UI endpoint directly
  • /healthz for the machine endpoint directly

Notes

  • The UI is intentionally small and stateless.
  • Route configuration is map-time, matching the usual ASP.NET Core endpoint style.
  • The page is designed to stay simple and easy to extend later.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 635 9/5/2026
0.2.0 441 8/6/2026
0.1.0 106 8/6/2026
0.0.105 99 8/6/2026