BlazorChat.Server 1.0.2

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

BlazorChat.Server

Commercial persistence and server components for BlazorChat.

✨ 30-Day Free Trial β€” Start building immediately, purchase when ready.

BlazorChat community edition (GPLv3) provides in-memory chat only. This package adds production-ready server features with persistent storage abstractions.

Installation

dotnet add package BlazorChat.Server

Getting Started

No license key needed for trial! Simply install and start building. Purchase a license at loneworx.com/blazor-chat/pricing when you're ready to deploy to production.

Quick Start

1. Register Services

Add BlazorChat.Server to your Program.cs:

using BlazorChat.Server.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Add Blazor components 
builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents();

// Add BlazorChat server services 
builder.Services.AddBlazorChatServer(builder.Configuration);

var app = builder.Build();

app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAntiforgery();
app.MapRazorComponents<App>() .AddInteractiveServerRenderMode();

// Map the BlazorChat SignalR hub app.MapBlazorChatHub();
app.Run();

2. Configure License Key (After Trial)

Add your license key to appsettings.json:

{
  "BlazorChat": {
	"LicenseKey": "YOUR_LICENSE_KEY_HERE"
  }
}

Or use environment variable:

BLAZORCHAT_LICENSE_KEY=your-license-key-here

Purchase license keys at loneworx.com/blazor-chat/pricing

Licensing & Network Requirements

BlazorChat uses a hybrid licensing system designed for maximum flexibility:

🏠 Development (Localhost)

  • βœ… Always free - no license key or network access required
  • Automatically detected for localhost, 127.0.0.1, and ::1

πŸ”‘ Purchased License Keys

  • βœ… Works completely offline - JWT validated locally
  • βœ… No API calls - cryptographic validation only
  • βœ… No firewall requirements - zero network dependencies
  • Domain restrictions enforced via JWT claims

πŸ†“ Trial Mode (No License Key)

When deployed without a license key:

Scenario Behavior Network Required?
First deployment Contacts License API to register 30-day trial βœ… Yes (one-time)
Subsequent restarts Loads trial from local disk cache ❌ No
API unreachable 7-day offline grace period (if previously cached) ❌ No
After 30 days Must purchase license key N/A

Trial registration requires one-time access to:

Host Port Purpose
api.loneworx.com 443 Trial registration (first deployment only)

Corporate firewall users: If deploying in trial mode, ensure api.loneworx.com:443 is accessible for initial trial registration. After registration, the trial JWT is cached locally and no further network access is needed.

Trial Cache Location

Trial licenses are cached at:

  • Windows: %LocalAppData%\.blazorchat\{domain}.json
  • Linux/macOS: ~/.local/share/.blazorchat/{domain}.json

Persistent Storage

Default Behavior:
BlazorChat.Server includes an in-memory storage implementation. Data is lost on server restart.

1. Install the SQL Server persistence provider:

dotnet add package BlazorChat.Server.SqlServer

2. Configure in Program.cs:

using BlazorChat.Server.SqlServer.Extensions;

// Replace AddBlazorChatServer with AddBlazorChatSqlServer 
builder.Services.AddBlazorChatSqlServer(builder.Configuration);

3. Add connection string to appsettings.json:

{
  "ConnectionStrings": {
	"BlazorChatDb": "Server=.;Database=BlazorChat;Trusted_Connection=true;"
  }
}

This replaces the in-memory repository with SQL Server persistence.

Custom Storage Providers

Implement IChatRepository and IChatPresenceStore for your own database:

using BlazorChat.Server.Storage;
public class MyCustomRepository : IChatRepository 
{ 
	// Implement message persistence methods 
	public Task<Message> CreateMessageAsync(Message message) { /* ... */ } 

	public Task<IEnumerable<Message>> GetMessagesAsync(string roomId) { / ... */ } 
	// ... other methods
}

public class MyCustomPresenceStore : IChatPresenceStore 
{ 
	// Implement user presence tracking methods 
	public Task SetUserOnlineAsync(string userId, string connectionId) { /* ... / } 
	
	public Task SetUserOfflineAsync(string connectionId) { / ... */ } 
	// ... other methods 
}

Register your implementations:

builder.Services.AddBlazorChatServer<MyCustomRepository, MyCustomPresenceStore>( builder.Configuration);

Features

  • βœ… Real-time SignalR chat hub - Instant message delivery
  • βœ… User presence tracking - Online/offline/typing status
  • βœ… Message persistence abstractions - Pluggable storage providers
  • βœ… Room/channel management - Multi-room support
  • βœ… Typing indicators - Real-time typing notifications
  • βœ… Read receipts - Message delivery confirmation
  • βœ… File upload support - Share files in chat
  • βœ… Emoji support - Rich emoji picker integration
  • βœ… Extensible storage - In-memory, SQL Server, or custom
  • βœ… Offline-first licensing - Purchased keys work without internet
  • βœ… Developer-friendly - Localhost always free

Configuration Options

Full configuration in appsettings.json:

{ 
	"BlazorChat": { 
		"LicenseKey": "your-license-key-here", 
		"LicenseApiUrl": "https://api.loneworx.com", 
		"PurchaseUrl": "https://loneworx.com/blazor-chat/pricing", 
		"Product": "BlazorChatServer", "Version": "1.0.0" 
		} 
}
Option Description Default
LicenseKey Your purchased license key (JWT) null (triggers trial)
LicenseApiUrl License API endpoint for trial registration https://api.loneworx.com
PurchaseUrl Purchase page URL https://loneworx.com/blazor-chat/pricing
Product Product identifier for license validation BlazorChatServer
Version Product version Package version

License Tiers

BlazorChat offers multiple licensing tiers:

  • Trial - 30 days, all features, automatic registration
  • SingleTenant - Production license for single-domain deployments
  • MultiTenant - Production license for multi-domain/SaaS deployments

See pricing page for details and feature comparison.

Troubleshooting

Trial registration fails on first deployment

Symptoms:

  • Server logs: "BlazorChat: License API unreachable"
  • Server logs: "BlazorChat: Trial request denied"

Solutions:

  1. Verify api.loneworx.com:443 is accessible from your server
  2. Check firewall/proxy settings allow outbound HTTPS
  3. Review server logs for detailed error messages
  4. For air-gapped/offline deployments, purchase a license key (works offline)

Server shows "Operating in offline grace period"

Meaning: Trial was cached successfully, but License API is unreachable on this startup. You have 7 days of grace period before license validation fails.

Solutions:

  1. Restore network access to api.loneworx.com (preferred)
  2. Purchase a license key to eliminate API dependency
  3. Monitor remaining grace period in logs

Grace period countdown:

BlazorChat: Operating in offline grace period (6 days, 23 hours remaining).

"No valid license" warning after 30 days

Meaning: Your trial period has ended.

Solution: Purchase a production license at loneworx.com/blazor-chat/pricing

License key shows as "malformed or unreadable"

Causes:

  • Incorrect copy/paste (extra spaces, line breaks)
  • Using an expired license key
  • Using a license key from a different product

Solutions:

  1. Copy license key exactly as provided (no extra whitespace)
  2. Verify license key hasn't expired
  3. Contact support if issue persists: support@loneworx.com

"License is not valid for domain" warning

Meaning: Your license key is restricted to specific domains, and the current domain doesn't match.

Solutions:

  1. Check JWT claims to see allowed domains
  2. Verify you're using the correct license key for this deployment
  3. Contact support to update domain restrictions

Data not persisting between restarts

Issue: Using default in-memory storage.

Solution: Install BlazorChat.Server.SqlServer package or implement custom storage providers.

SignalR hub connection fails

Common causes:

  1. Missing app.MapBlazorChatHub(); in Program.cs
  2. SignalR not configured in client
  3. CORS issues (if client on different origin)

Solutions:

// Server: Ensure hub is mapped
app.MapBlazorChatHub();
// Client: Configure SignalR connection 
	var hubConnection = new HubConnectionBuilder() 
		.WithUrl(navigationManager.ToAbsoluteUri("/chathub")) 
		.Build();

API Reference

Extension Methods

AddBlazorChatServer(IConfiguration, Action<BlazorChatOptions>?)

Registers BlazorChat services with in-memory storage.

AddBlazorChatServer<TRepository, TPresenceStore>(IConfiguration, Action<BlazorChatOptions>?)

Registers BlazorChat services with custom storage implementations.

AddBlazorChatSqlServer(IConfiguration)

Registers BlazorChat services with SQL Server persistence.

MapBlazorChatHub()

Maps the BlazorChat SignalR hub to /chathub endpoint.

Interfaces

IChatRepository

Contract for message persistence operations.

Key Methods:

  • Task<Message> CreateMessageAsync(Message message)
  • Task<IEnumerable<Message>> GetMessagesAsync(string roomId)
  • Task<Message?> GetMessageByIdAsync(Guid messageId)
  • Task DeleteMessageAsync(Guid messageId)
IChatPresenceStore

Contract for user presence tracking.

Key Methods:

  • Task SetUserOnlineAsync(string userId, string connectionId)
  • Task SetUserOfflineAsync(string connectionId)
  • Task<IEnumerable<string>> GetOnlineUsersAsync(string roomId)
  • Task UpdateTypingStatusAsync(string userId, string roomId, bool isTyping)
ILicenseInfo

Provides license status and trial information.

Properties:

  • bool IsTrial - Is running on trial/grace period
  • int? DaysRemaining - Days left in trial
  • string PurchaseUrl - License purchase URL

Support & Resources

Documentation

πŸ“– Full Documentation
πŸ”§ API Reference
πŸ’‘ Custom Storage Guide
🎯 Migration Guide

Commercial Support

πŸ“§ Email: support@loneworx.com
🌐 Website: loneworx.com
πŸ’° Pricing: loneworx.com/blazor-chat/pricing
🎯 Live Demo: loneworx.com/blazor-chat-demo

For technical support or sales inquiries, contact us at support@loneworx.com

Enterprise Support Available:

  • Priority response times
  • Dedicated Slack/Teams channel
  • Architecture consulting
  • Custom feature development
  • BlazorChat (Community Edition) - GPLv3 in-memory chat components
  • BlazorChat.Server (This package) - Commercial server with persistence
  • BlazorChat.Server.SqlServer - SQL Server persistence provider
  • BlazorChat.Shared - Shared models and contracts

License

Proprietary commercial software. 30-day free trial included.

About LoneWorx

LoneWorx LLC - Crafting exceptional software solutions.

🌐 www.loneworx.com
πŸ“§ info@loneworx.com
πŸ“ United States


Copyright Β© 2024-2026 LoneWorx LLC. All rights reserved.

BlazorChatβ„’ is a trademark of LoneWorx LLC.

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 BlazorChat.Server:

Package Downloads
BlazorChat.Server.SqlServer

SQL Server persistence provider for BlazorChat.Server. Production-ready database storage implementation. Auto-installs BlazorChat.Server dependency. Requires SQL Server 2016+ or Azure SQL Database.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 39 3/9/2026

v1.0.2:
- Fixed: Emoji reactions replacing each other when multiple different emojis added to the same message