Vaxel.AspNetCore 1.0.0

dotnet add package Vaxel.AspNetCore --version 1.0.0
                    
NuGet\Install-Package Vaxel.AspNetCore -Version 1.0.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="Vaxel.AspNetCore" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vaxel.AspNetCore" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Vaxel.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 Vaxel.AspNetCore --version 1.0.0
                    
#r "nuget: Vaxel.AspNetCore, 1.0.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 Vaxel.AspNetCore@1.0.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=Vaxel.AspNetCore&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Vaxel.AspNetCore&version=1.0.0
                    
Install as a Cake Tool

Vaxel.AspNetCore

ASP.NET Core integration and server hypermedia primitives for vaxel.

Repository: github.com/System-D-AB/vaxel

Installation

dotnet add package Vaxel.AspNetCore

Note: Referencing Vaxel.AspNetCore automatically pulls in Vaxel.Client as a transitive dependency. No npm, node, or client-side build steps are required.

Quick Start

1. Register Services and Middleware

In Program.cs:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorPages();
builder.Services.AddVaxel(options =>
{
    options.Push.HeartbeatSeconds = 20;
    options.Push.MaxConnectionsPerIdentity = 4;
});

var app = builder.Build();

app.UseStaticFiles();
app.UseRouting();
app.UseVaxel();

app.MapRazorPages();
app.MapVaxelStream("/_vaxel/stream");

app.Run();

2. Add Layout Script Tag

In _Layout.cshtml:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>My Application</title>
    <vaxel-antiforgery />
</head>
<body vx-sse="/_vaxel/stream">
    <section id="pane" vx-region>
        @RenderBody()
    </section>
    <script src="/_vaxel/vaxel.js"></script>
</body>
</html>

3. Handle Page vs Patch

public async Task<IActionResult> OnGetAsync()
{
    return await Vaxel.PageOrPatch(HttpContext,
        page: () => Task.FromResult<IActionResult>(Page()),
        patch: async () =>
        {
            var fragment = await _composer.PartialAsync("_Content", Model);
            return Patch.Ok().Replace("#pane", fragment);
        });
}

Security & CSP

vaxel is designed from the ground up to run under strict Content Security Policies with zero unsafe-eval, zero new Function(), and zero string timers:

Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self';

Documentation

Architecture, protocol, and cookbook: docs/.

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 (1)

Showing the top 1 NuGet packages that depend on Vaxel.AspNetCore:

Package Downloads
Vaxel.Testing

Testing harness and assertion utilities for Växel applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 141 8/24/2026