Webority.Delivery.AspNetCore 0.16.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Webority.Delivery.AspNetCore --version 0.16.0
                    
NuGet\Install-Package Webority.Delivery.AspNetCore -Version 0.16.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="Webority.Delivery.AspNetCore" Version="0.16.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Webority.Delivery.AspNetCore" Version="0.16.0" />
                    
Directory.Packages.props
<PackageReference Include="Webority.Delivery.AspNetCore" />
                    
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 Webority.Delivery.AspNetCore --version 0.16.0
                    
#r "nuget: Webority.Delivery.AspNetCore, 0.16.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 Webority.Delivery.AspNetCore@0.16.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=Webority.Delivery.AspNetCore&version=0.16.0
                    
Install as a Cake Addin
#tool nuget:?package=Webority.Delivery.AspNetCore&version=0.16.0
                    
Install as a Cake Tool

Webority.Delivery.AspNetCore

How a Webority Razor head ships its bytes:

  • Brotli-first response compression, so Cloudflare delivers Brotli instead of passing IIS gzip through.
  • Static files with the fleet cache policy: versioned files a year (never immutable), unversioned files an hour in the browser and a month at the edge, the version marker never stored.
  • Cloudflare edge-cache headers: the origin decides what the edge may cache; anonymous, cookie-free pages are cacheable, everything else is no-store.
services.AddWeborityDelivery();

app.UseWeborityDelivery();                     // replaces UseResponseCompression + UseStaticFiles
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseWeborityCloudflareCache(cacheOptions);  // Cloudflare-fronted heads

Endpoints that own their caching carry [OwnCacheControl].

Static assets can also be served from Cloudflare R2, opt-in per head. Without the StaticAssets section, static.json and static-build.json, every file is served from the site as before, and asp-append-version writes ?v= with 12 hex characters of the file's sha256. A head with <WeborityStaticAssets>true</WeborityStaticAssets> links authored files through IStaticAssets.Url("<key>"). With StaticAssets:BuildOrigin set, every asp-append-version URL for a file in the release's static-build.json points at /_static/<head>/<set>/. A setting the head's files cannot honour fails at startup. Add IStaticAssets.CspSources to the CSP, and never add MapStaticAssets.

A host without pages (Azure Functions, a worker) links authored files through the Webority.Delivery package and AddWeborityStaticAssets.

API heads answer every failure as { code, message, traceId } (never problem details), echo X-Correlation-Id, and expose an honest /health:

services.AddWeborityErrorHandling(options => options
    .Map<InvoiceLockedException>(409, "invoice_locked", "This invoice is locked."));
services.AddWeborityIdempotency<AppDbContext>();   // opt-in: [Idempotent] POST/PATCH run once per Idempotency-Key
services.AddWeborityMinAppVersion();               // opt-in: X-Min-App-Version and 426 client_update_required

app.UseWeborityErrorHandling();                // first in the pipeline
app.UseWeborityMinAppVersion();                // after UseCors
app.UseWeborityIdempotency();                  // after UseAuthorization
endpoints.MapWeborityHealth();                 // anonymous, no-store, never rate limited

return this.Failure(StatusCodes.Status403Forbidden, "employee_only", "Only employees can open this.");

The package's analyzer checks API code in the build (WEB001 ProblemDetails, WEB002 anonymous or string error bodies, WEB003 a local exception handler, WEB004 exception text in a response) against a per-project ceiling in .webority/api-rules-baseline.json that only shrinks. With no file every finding fails; dotnet build --no-incremental -p:WeborityApiRulesSeed=true prints each project's counts (WEB102) to seed it. The analyzer targets netstandard2.0 and needs Microsoft.CodeAnalysis.CSharp 4.14.0 or later.

services.AddWeborityHealthChecks<AppDbContext>() registers the database and data-protection checks; query.ToPagedDataObjectAsync(page, pageSize, ct) returns the fleet paged list { items, page, pageSize, totalCount, totalPages }. A request derived from PagedListRequest exposes ResolvedPage (1 when absent or below 1) and ResolvedPageSize (20 when absent or below 1, never over 100) for services that page without a queryable; the defaults are the public constants PagedListRequest.DefaultPageSize and PagedListRequest.MaxPageSize, the same ones the helper uses.

Server-side DataTables lists bind the 1.10 POST and reach only the members a handler names:

services.AddWeborityDataTables();

public async Task<IActionResult> OnPostRowsAsync(IDataTablesRequest request, CancellationToken ct)
{
    var rows = db.Partners.Select(p => new { p.Code, p.FirmName, p.ContactEmail });
    int filtered = await rows.ApplySearch(request, "code,firmName,contactEmail").CountAsync(ct);
    var page = rows.ApplySearch(request, "code,firmName,contactEmail")
        .ApplySorting(request, "code,firmName")
        .ApplyPaging(request);
    return new DataTablesJsonResult(request.CreateResponse(await rows.CountAsync(ct), filtered, await page.ToListAsync(ct)));
}
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.

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.24.6 0 10/28/2026
0.24.5 4 10/28/2026
0.24.4 42 10/28/2026
0.24.3 50 10/27/2026
0.24.2 61 10/26/2026
0.24.1 72 10/25/2026
0.24.0 65 10/25/2026
0.23.0 66 10/24/2026
0.22.0 79 10/24/2026
0.21.0 71 10/24/2026
0.20.0 67 10/24/2026
0.19.0 62 10/24/2026
0.18.0 66 10/24/2026
0.17.0 74 10/22/2026
0.16.1 105 10/17/2026
0.16.0 91 10/16/2026
0.15.1 97 10/16/2026
0.15.0 120 10/15/2026
0.14.0 100 10/14/2026
0.13.0 107 10/13/2026
Loading failed