Rask.WebPush 0.21.1-alpha.0.81

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

Rask.WebPush

Server-side Web Push sender. Signs VAPID and encrypts (RFC 8291, aes128gcm) push messages, then POSTs them to a browser PushSubscription endpoint. It is the send half that pairs with Rask.Wasm's IWebPush client — but it is transport-neutral: usable from a Rask Server app or any ASP.NET backend behind a WASM PWA.

No external dependencies beyond Microsoft.Extensions.* — all crypto is in-box System.Security.Cryptography.

Install

dotnet add package Rask.WebPush

Use

The key pair and the contact come from the Rask:WebPush configuration section. Generate the pair once with VapidKeys.Generate() and keep it in user secrets or the environment, never in source:

dotnet user-secrets set "Rask:WebPush:VapidKeys:PublicKey"  "<public>"
dotnet user-secrets set "Rask:WebPush:VapidKeys:PrivateKey" "<private>"
// appsettings.json
{
  "Rask": {
    "WebPush": {
      "Subject": "mailto:admin@example.com"    // a contact the push service can reach
    }
  }
}
builder.Services.AddRaskWebPush();   // reads Rask:WebPush; a callback here would run after it and win

// ... inject IWebPush, then given a PushSubscription the browser sent you:
var result = await sender.SendAsync(
    subscription,
    new WebPushMessage { Title = "Hello", Body = "from the server" },
    ct);

// Inspect the result to prune dead subscriptions:
if (result.ShouldDelete) await store.RemoveAsync(subscription);

Notes

  • Standards-based — VAPID (RFC 8292) auth + RFC 8291 aes128gcm payload encryption; interops with any standard browser Push service (FCM, Mozilla, WNS).
  • Zero external deps — ECDH, HKDF and AES-GCM come from System.Security.Cryptography.
  • Generate a VAPID key pair once with VapidKeys.Generate() and keep the private key server-side; hand the public key to the browser subscription.
  • SendAsync returns a WebPushResult whose ShouldDelete / ShouldRetry flags map the push service's response to the action to take on the subscription.

Full documentation: https://github.com/pal-tamas/rask/blob/main/docs/pwa.md

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rask.WebPush:

Package Downloads
Rask

The one reference a Rask application needs, server or browser. On a server target (net10.0 or net11.0) it brings the ASP.NET host plus every battery — database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, and SQLite snapshots and continuous backup — with RaskApp.Create(args) as the entry point. On a browser target it brings the WebAssembly host, the source-generated mediator, the query cache and remote dispatch. Everything referenced is wired and on; app.Configure(c => c.Jobs.Off()) is how an app does without one. Reference Rask.Server for a lean host with no database.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.21.1-alpha.0.87 0 9/15/2026
0.21.1-alpha.0.83 0 9/15/2026
0.21.1-alpha.0.81 0 9/15/2026
0.21.1-alpha.0.80 0 9/15/2026
0.21.1-alpha.0.79 0 9/15/2026
0.21.1-alpha.0.78 0 9/15/2026
0.21.1-alpha.0.77 6 9/15/2026
0.21.1-alpha.0.76 7 9/15/2026
0.21.1-alpha.0.75 9 9/15/2026
0.21.1-alpha.0.74 3 9/15/2026
0.21.1-alpha.0.73 7 9/15/2026
0.21.1-alpha.0.72 5 9/15/2026
0.21.1-alpha.0.71 8 9/15/2026
0.21.1-alpha.0.70 29 9/15/2026
0.21.1-alpha.0.69 21 9/15/2026
0.21.1-alpha.0.68 25 9/15/2026
0.21.1-alpha.0.67 35 9/14/2026
0.21.1-alpha.0.66 43 9/14/2026
0.21.1-alpha.0.65 38 9/14/2026
0.21.0 128 9/10/2026
Loading failed