Back to Directory
.NET & C# July 21, 2026

How to Monitor Your ASP.NET Core App Uptime and Health | Pingzo

How to Monitor Your ASP.NET Core App Uptime with Pingzo

ASP.NET Core is Microsoft's high-performance, cross-platform framework for building modern cloud-based web applications, microservices, and REST APIs. Known for its throughput and enterprise reliability, ASP.NET Core runs on top of Kestrel web server or behind reverse proxies like IIS and NGINX.

However, enterprise .NET applications are susceptible to operational issues such as database connection pool exhaustion, thread pool starvation, unhandled exceptions, and middleware deadlocks. This guide walks you through configuring ASP.NET Core Health Checks middleware and setting up automated external uptime monitoring with Pingzo.


1. Why ASP.NET Core Applications Need Uptime Monitoring

ASP.NET Core relies on an asynchronous thread pool architecture (async/await). Improper handling of task execution can degrade performance or trigger application crashes:

  • Thread Pool Starvation: Blocking asynchronous code with .Result or .Wait() starves the .NET thread pool, leading to HTTP request queuing and high response latency.
  • Database Connection Pool Exhaustion: Unreleased DbContext instances or database connection leaks exhaust Entity Framework Core connection pools, causing HTTP 500 errors for new requests.
  • Kestrel & Reverse Proxy Disconnects: If NGINX or IIS loses communication with the underlying Kestrel process, external visitors receive HTTP 502 Bad Gateway responses while internal process monitoring might report the process as active.
  • Memory Pressure & GC Pauses: Large Object Heap (LOH) fragmentation can trigger full Garbage Collection (GC) pauses, causing intermittent response spikes.

2. Key Metrics to Monitor in ASP.NET Core

To maintain high availability for your .NET applications, monitor these four critical layers:

Primary Endpoint Availability

Continuously test your application's primary domain to verify HTTPS availability, SSL certificate validity, and HTTP response status codes.

Dedicated Health Checks Endpoint (/health)

ASP.NET Core includes native Health Checks middleware (Microsoft.Extensions.Diagnostics.HealthChecks). You should configure a /health endpoint that checks critical dependencies such as SQL Server, PostgreSQL, Redis, and external APIs.

// Program.cs
var builder = WebApplication.CreateBuilder(args);

// Add health checks for database and services
builder.Services.AddHealthChecks()
    .AddDbContextCheck<ApplicationDbContext>();

var app = builder.Build();

// Map the health check route
app.MapHealthChecks("/health");

app.Run();

3. Step-by-Step Guide: Setting Up Pingzo Uptime Checks for ASP.NET Core

Step 1: Deploy the Health Endpoint

Ensure your /health endpoint returns an HTTP 200 Healthy payload when all services are functional, and HTTP 503 Unhealthy when a core dependency is down.

Step 2: Configure a Pingzo HTTP Monitor

  1. Log in to your Pingzo Dashboard.
  2. Click Create Monitor and select HTTP / HTTPS.
  3. Set the target URL to https://yourdomain.com/health.
  4. Set the check interval (e.g., 60 seconds).
  5. Specify the expected HTTP status code as 200.

Step 3: Enable Instant WhatsApp & Alert Channels

Configure your notification preferences to receive instant alerts via WhatsApp, Slack, or Email as soon as an HTTP check fails or returns a non-200 code.


4. Best Practices for ASP.NET Core Monitoring

  • Avoid Heavy Logic in Health Checks: Keep health check execution fast (under 200ms) to prevent adding load during peak traffic.
  • Set Up SSL Expiry Warnings: Ensure your SSL certificate validation is monitored automatically to catch expiration dates 30, 14, and 7 days in advance.
  • Public Status Pages: Share real-time status with users by creating a hosted Pingzo Status Page linked to your ASP.NET Core health monitors.

Summarize with AI

Instantly generate a summary of this page using your favorite LLM

pz-console
// Terminal
$npm install @pingzoapp/sdk
// Initialization Code
import { Pingzo } from '@pingzoapp/sdk';
const checker = new Pingzo({ apiKey: 'pz_live_...' });
[pingzo-agent] monitoring active: ASP.NET Core
[pingzo-agent] status: 200 OK | latency: 85ms
DevOps Uptime Check

Uptime monitoring built for ASP.NET Core developers

Configure HTTP health routes, inspect SSL status, and track cron workers from our console dashboard. Get direct texts on WhatsApp.

Start Monitoring Free