Eigenverft.NetLib.Hosting.SelfHttpWarmup
1.0.0.5-g17613f8942
See the version list below for details.
dotnet add package Eigenverft.NetLib.Hosting.SelfHttpWarmup --version 1.0.0.5-g17613f8942
NuGet\Install-Package Eigenverft.NetLib.Hosting.SelfHttpWarmup -Version 1.0.0.5-g17613f8942
<PackageReference Include="Eigenverft.NetLib.Hosting.SelfHttpWarmup" Version="1.0.0.5-g17613f8942" />
<PackageVersion Include="Eigenverft.NetLib.Hosting.SelfHttpWarmup" Version="1.0.0.5-g17613f8942" />
<PackageReference Include="Eigenverft.NetLib.Hosting.SelfHttpWarmup" />
paket add Eigenverft.NetLib.Hosting.SelfHttpWarmup --version 1.0.0.5-g17613f8942
#r "nuget: Eigenverft.NetLib.Hosting.SelfHttpWarmup, 1.0.0.5-g17613f8942"
#:package Eigenverft.NetLib.Hosting.SelfHttpWarmup@1.0.0.5-g17613f8942
#addin nuget:?package=Eigenverft.NetLib.Hosting.SelfHttpWarmup&version=1.0.0.5-g17613f8942&prerelease
#tool nuget:?package=Eigenverft.NetLib.Hosting.SelfHttpWarmup&version=1.0.0.5-g17613f8942&prerelease
Eigenverft.NetLib.Hosting.SelfHttpWarmup
Warm up an ASP.NET Core application by sending HTTP GET requests to its own endpoints once the host has started.
✨ At a glance
| Capability | What it does | Starting point |
|---|---|---|
| Code-based warmup | Enable one or more absolute HTTP or HTTPS targets | AddSelfHttpWarmup(...) |
| Configuration-based warmup | Bind the SelfHttpWarmup options section |
AddSelfHttpWarmup() |
| Startup timing | Set an optional initial delay and per-request timeout | SelfHttpWarmupOptions |
| Host lifecycle | Wait until the application reports started; cancel in-flight requests on shutdown | Hosted service |
📦 Installation
dotnet add package Eigenverft.NetLib.Hosting.SelfHttpWarmup
🚀 Quick start
Use the application's actual listening URL and a lightweight endpoint that is available after startup:
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Eigenverft.NetLib.Hosting.SelfHttpWarmup;
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseUrls("http://localhost:5080");
builder.Services.AddSelfHttpWarmup(
"http://localhost:5080/health",
options =>
{
options.InitialDelay = TimeSpan.FromSeconds(1);
options.RequestTimeout = TimeSpan.FromSeconds(3);
});
var app = builder.Build();
app.MapGet("/health", () => Results.Ok());
await app.RunAsync();
The hosted service waits for ApplicationStarted, then sends each configured target sequentially with GET. The default initial delay is zero and each request has a five-second timeout.
For a lightweight liveness target, the separate Eigenverft.WebLib.HealthProbes package provides a fixed GET/HEAD /health response: GET returns 200 with OK, and HEAD returns 200 without a body. It does not invoke ASP.NET Core health checks or report dependency readiness. Either package can be used without the other.
⚙️ Configure through appsettings
Register the feature and bind the SelfHttpWarmup section:
builder.Services.AddSelfHttpWarmup();
{
"SelfHttpWarmup": {
"Enabled": true,
"InitialDelay": "00:00:01",
"RequestTimeout": "00:00:05",
"TargetUrls": [
"http://localhost:5080/health"
]
}
}
Options binding alone leaves warmup disabled. The URL overloads and the options-action overload enable it automatically. Targets must be absolute HTTP or HTTPS URLs; invalid targets supplied through the direct URL overload are rejected during registration.
The client connects directly without a proxy, does not follow redirects, and has a one-second connection timeout per resolved address. Point it at an address and port served by this process. Request failures and timeouts are logged and do not stop the host. The package depends on Microsoft.Extensions hosting and HTTP abstractions and does not add an ASP.NET Core shared-framework dependency.
🎯 Target frameworks
net8.0net10.0
A .NET 9 consumer can use the compatible net8.0 asset.
🔗 Project links
📄 License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- Microsoft.Extensions.Hosting (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
-
net8.0
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0.5-gdfdd996480 | 0 | 9/29/2026 |
| 1.0.0.5-g17613f8942 | 0 | 9/29/2026 |
| 1.0.0.3-g28e841270d | 0 | 9/28/2026 |
| 1.0.0.2-gbac57d8b97 | 0 | 9/11/2026 |
| 1.0.0.2-g9537b96514 | 0 | 9/11/2026 |
Initial Eigenverft.NetLib.Hosting.SelfHttpWarmup capability package extracted from the historic WebLib implementation; public namespaces and APIs remain unchanged.
- Microsoft.Extensions hosted-service helpers that warm up an application through its own HTTP endpoint.
- Public namespaces and behavior remain compatible with the original Infrastructure implementation.