Albatross.Hosting 10.1.0

Prefix Reserved
This package has a SemVer 2.0.0 package version: 10.1.0+171cd68.
dotnet add package Albatross.Hosting --version 10.1.0
                    
NuGet\Install-Package Albatross.Hosting -Version 10.1.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="Albatross.Hosting" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Albatross.Hosting" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Albatross.Hosting" />
                    
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 Albatross.Hosting --version 10.1.0
                    
#r "nuget: Albatross.Hosting, 10.1.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 Albatross.Hosting@10.1.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=Albatross.Hosting&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Albatross.Hosting&version=10.1.0
                    
Install as a Cake Tool

Albatross.Hosting

A .NET library that simplifies creating ASP.NET Web API and background service applications with preconfigured settings. It provides a streamlined bootstrapping experience with built-in Serilog logging, configuration management, authentication, and Swagger documentation while maintaining full access to ASP.NET Core's capabilities.

Designed for enterprise applications, Albatross.Hosting enforces consistent patterns for web APIs and background services with out-of-the-box support for JWT/Kerberos authentication, global exception handling, and request logging.

Key Features

  • Minimal Boilerplate - Fluent API for application bootstrapping with sensible defaults
  • Serilog Integration - Pre-configured logging via Albatross.Logging
  • Configuration Management - Simplified config handling via Albatross.Config
  • Authentication Support - Built-in JWT Bearer and Kerberos (Negotiate) authentication
  • OpenAPI/Swagger - Pre-configured Swagger documentation endpoints
  • Global Exception Handling - Consistent error responses with ProblemDetails support
  • SPA Hosting - Built-in Angular application hosting support
  • Request Logging - HTTP request/response logging middleware
  • Response Compression - Gzip and Brotli compression support
  • Service Hosting - Windows Service and systemd support for background services

Quick Start

Web API Application

Create a console app and change the SDK to Microsoft.NET.Sdk.Web. In the Program.cs file:

public class Program {
    public static Task Main(string[] args) {
        return new Setup(args)
            .ConfigureWebHost<MyStartup>()
            .RunAsync();
    }
}

Create a startup class:

public class MyStartup : Albatross.Hosting.Startup {
    public MyStartup(IConfiguration configuration) : base(configuration) { }
}

Background Service Application

Create a console app. In the Program.cs file:

public class Program {
    public static Task Main(string[] args) {
        Environment.CurrentDirectory = AppContext.BaseDirectory;
        return new MySetup(args)
            .ConfigureServiceHost<MyHostedService>()
            .RunAsService()
            .RunAsync();
    }
}

Create a setup class:

public class MySetup : Setup {
    public MySetup(string[] args) : base(args) { }
    public override void ConfigureServices(IServiceCollection services, IConfiguration configuration) {
        base.ConfigureServices(services, configuration);
    }
}

Create a hosted service:

public class MyHostedService : IHostedService {
    public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}

Dependencies

  • Albatross.Logging 10.0.1+
  • Albatross.Config 7.5.11+
  • Microsoft.AspNetCore.Authentication.JwtBearer 10.0.1+

Prerequisites

  • .NET 10 SDK

📖 Documentation

📚 Complete Documentation

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
10.1.0 32 1/27/2026
10.0.1 33 1/20/2026
10.0.0 65 12/11/2025
10.0.0-75.main 64 11/17/2025
10.0.0-63.main 67 11/12/2025
9.0.7 72 11/17/2025
9.0.6 65 11/15/2025
9.0.4 74 10/29/2025
9.0.3 78 10/28/2025
9.0.2 75 10/27/2025
9.0.1-46.main 73 7/26/2025
8.0.4 122 3/31/2025
8.0.1 137 3/9/2025
7.6.1 201 3/5/2025
7.6.0 102 1/8/2025
7.5.7 117 11/11/2024
7.5.6 97 11/8/2024
7.5.5 110 11/7/2024
7.5.4 95 11/7/2024
7.4.2 122 10/8/2024
6.1.1 330 9/18/2023
4.0.2 786 10/18/2022
2.8.0 612 8/11/2021
2.3.6 618 2/23/2021
1.6.33 684 1/8/2021
1.6.32 740 12/22/2020
1.6.27 681 10/14/2020
1.6.26 758 10/14/2020
1.6.23 835 9/27/2020
1.6.20 1,148 9/24/2020
1.6.19 712 9/17/2020
1.6.18 739 9/17/2020
1.6.17 751 9/11/2020
1.6.16 714 9/3/2020
1.6.15 787 9/1/2020
1.6.13 699 8/21/2020
1.6.8 733 8/5/2020
1.6.6 744 7/30/2020
1.6.5 751 7/30/2020
1.6.4 793 7/29/2020
1.6.2 761 7/20/2020