HsSqlAgent.Hosting 2.0.5

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

HsSqlAgent.Hosting

Official batteries-included ASP.NET Core composition for HsSqlAgent.

Use this package when you want the same capability composition and configuration contract as the first-party ToolBox / Docker image. Use HsSqlAgent.Server directly when you need to replace individual capabilities, authentication, approval providers, UI, or middleware ordering.

Install

dotnet add package HsSqlAgent.Hosting

HsSqlAgent.Hosting brings in the standard HsSqlAgent.Server runtime plus the official generic HsSqlAgent.Approvals.Webhook adapter. It does not add runtime NuGet/DLL plugin loading.

Use

using HsSqlAgent.Hosting;

var builder = WebApplication.CreateBuilder(args);

builder.AddHsSqlAgentStandardHost();

var app = builder.Build();

app.UseHsSqlAgentStandardHost();

await app.RunAsync();

The standard host owns HsSqlAgent's built-in runtime, Admin Store, built-in identity, MCP endpoint, Admin API/UI, telemetry, exception handling, and DML approval provider selection. URL binding and logging remain normal host-owned ASP.NET Core concerns.

DML approval provider

The same configuration works in a .NET host and in the official Docker image.

MCP Elicitation is the default:

{
  "DmlApproval": {
    "Provider": "McpElicitation"
  }
}

To use the official generic Webhook adapter:

{
  "DmlApproval": {
    "Provider": "Webhook",
    "Webhook": {
      "Endpoint": "https://approval.example.com/hssqlagent/requests",
      "CallbackUrl": "https://sql-agent.example.com/api/hs-sql-agent/approvals/webhook",
      "SigningSecret": "replace-with-a-unique-secret-at-least-32-bytes"
    }
  }
}

Environment variables use normal ASP.NET Core configuration names, for example:

DmlApproval__Provider=Webhook
DmlApproval__Webhook__Endpoint=https://approval.example.com/hssqlagent/requests
DmlApproval__Webhook__CallbackUrl=https://sql-agent.example.com/api/hs-sql-agent/approvals/webhook
DmlApproval__Webhook__SigningSecret=replace-with-a-unique-secret-at-least-32-bytes

Unknown provider names fail at startup. Standard hosting intentionally owns this selector; if you need a custom IDmlApprovalProvider, use the modular HsSqlAgent.Server package instead.

Modular alternative

For an existing ASP.NET Core application that wants to keep its own authentication, authorization, frontend, exception handling, telemetry, or approval composition:

dotnet add package HsSqlAgent.Server

Then opt into only the capabilities you need with the AddHsSqlAgent* modular APIs. Optional integrations such as HsSqlAgent.Approvals.Webhook can be referenced separately.

This split keeps the library surface composable while giving Docker and batteries-included NuGet users one shared first-party composition.

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
2.0.5 44 9/8/2026
2.0.4 58 9/7/2026
2.0.3 67 9/5/2026