Using ASP.NET Core Health Checks With ASP.NET Full Framework

Written by Ken Dale

Health checks in ASP.NET Core are useful for reporting the health of your ASP.NET Core web application. But, this functionality can’t directly be used with ASP.NET Full Framework applications.

That’s where the RimDev.AspNet.Diagnostics.HealthChecks NuGet package steps in — this package enables an experience similar to ASP.NET Core health checks on the full ASP.NET (non-Core) framework.

Here’s an example usage in an OWIN Startup class:

public class Startup
{
    public void Configuration(IAppBuilder app)
    {
        app.UseHealthChecks(
            "/_health",
            new PingHealthCheck(
                new PingHealthCheckOptions()
                    .AddHost("localhost", 1000)));
    }
}

The code is open source, MIT licensed, and available at https://github.com/ritterim/RimDev.AspNet.Diagnostics.HealthChecks — let us know what you think!

Published February 12, 2019 by

undefined avatar
Ken Dale Github Senior Application Developer (Former)

Suggested Reading