Dosaic.Hosting.WebHost
1.2.0
See the version list below for details.
dotnet add package Dosaic.Hosting.WebHost --version 1.2.0
NuGet\Install-Package Dosaic.Hosting.WebHost -Version 1.2.0
<PackageReference Include="Dosaic.Hosting.WebHost" Version="1.2.0" />
<PackageVersion Include="Dosaic.Hosting.WebHost" Version="1.2.0" />
<PackageReference Include="Dosaic.Hosting.WebHost" />
paket add Dosaic.Hosting.WebHost --version 1.2.0
#r "nuget: Dosaic.Hosting.WebHost, 1.2.0"
#:package Dosaic.Hosting.WebHost@1.2.0
#addin nuget:?package=Dosaic.Hosting.WebHost&version=1.2.0
#tool nuget:?package=Dosaic.Hosting.WebHost&version=1.2.0
Dosaic.Hosting.Webhost
Dosaic.Hosting.WebHost is the core package that allows dotnet dev's to use the dosaic web host and dosaic plugins.
This package is mandatory, without it you can't use any plugins
Installation
To install the nuget package follow these steps:
dotnet add package Dosaic.Hosting.Generator # this is required so the web host can discover & load the plugins
dotnet add package Dosaic.Hosting.WebHost
or add as package reference to your .csproj
<PackageReference Include="Dosaic.Hosting.Generator" Version="" />
<PackageReference Include="Dosaic.Hosting.WebHost" Version="" />
Rewrite the Entrypoint Program.cs to have following code:
using Dosaic.Hosting.WebHost;
PluginWebHostBuilder.RunDefault(Dosaic.Generated.DosaicPluginTypes.All);
Config files and ENV vars
Dosaic will try to load config files and values in the following order
appsettings.jsonappsettings.yamlappsettings.ymlappsettings.*.jsonappsettings.*.yamlappsettings.*.ymlappsettings.secrets.ymlappsettings.*.secrets.ymlENV variables
NOTE: All settings (does not matter which file extension) will be ordered by node length. And the secret files will be loaded as last (except the environment variables).
Additional Config Paths
You can load config files from extra folders. Dosaic will scan them first, before the main app folder.
Via Environment Variable:
DOSAIC_HOST_ADDITIONALCONFIGPATHS=/path/to/configs,/another/path
Via Command Line:
dotnet run --additional-config-paths "/path/to/configs,/another/path"
Features:
- Scans subfolders for
appsettings.*files - Supports JSON, YAML, and YML formats
- Uses absolute or relative paths
- Non-existent paths are ignored
- Secrets files load last
Example:
- appsettings.yaml (from extra paths)
- appsettings.api.yaml (from extra paths)
- appsettings.api.host.yaml (from extra paths)
- appsettings.secrets.yaml (from extra paths)
- appsettings.yaml (from main app)
- appsettings.api.yaml (from main app)
- appsettings.api.host.yaml (from main app)
- appsettings.*.secrets.yaml (all locations)
- ENV Variables
File names must always start with appsettings or they will be ignored!
Nested settings use _ to build their hierarchy as ENV variables
host:
urls: http://+:5300 # optional, default is 8080;separate multiple urls with ","
becomes
HOST_URLS=http://+:5300 # optional, default is 8080;separate multiple urls with ","
## General settings
Configure your config file with these properties
```yaml
host:
urls: http://+:5300 # optional, default is 8080;separate multiple urls with ","
maxRequestSize: 8388608 # optional, default is 8 MB
or as ENV variables
HOST_URLS=http://+:5300 # optional, default is 8080;separate multiple urls with ","
HOST_MAXREQUESTSIZE=8388608 # optional, default is 8 MB
Logging
Configure your appsettings.logging.yml with these properties
serilog:
minimumLevel: Debug # or Warn or Info
override:
System: Error # or Warning or Information
Microsoft: Error # or Warning or Information
or as ENV variables
SERIOLOG_minimumLevel=Debug
SERIOLOG_OVERRIDE_SYSTEM=Error
SERIOLOG_OVERRIDE_MICROSOFT=Error
Usage
Rewrite your entrypoint Program.cs to have following code:
Dosaic.Hosting.WebHostPluginWebHostBuilder.RunDefault(Dosaic.Generated.DosaicPluginTypes.All);
Now you can add additional plugins as nuget packages to your project and configure them via config files/settings and/or in your web host plugin
OpenTelemetry settings
Dosaic uses open telemetry for it's tracing capabilities. Further info can be found here
https://opentelemetry.io/docs/instrumentation/net/getting-started/
If there is a tracing host configured, the service will try to send any traces, metrics or logs to this host. it will also enrich the log messages with SpanIds and TraceIds.
telemetry:
host: http://localhost:3333
protocol: grpc
headers:
- name: Authorization
value: Bearer
Metrics
Dosaic uses open telemetry for it's metrics capabilities. Further info can be found here
| Product | Versions 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. |
-
net10.0
- AspNetCore.HealthChecks.System (>= 9.0.0)
- AspNetCoreRateLimit (>= 5.0.0)
- Chronos.Net (>= 2.0.24)
- Dosaic.Hosting.Abstractions (>= 1.2.0)
- NetEscapades.Configuration.Yaml (>= 3.1.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.14.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.14.0)
- OpenTelemetry.Extensions.Propagators (>= 1.14.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.14.0)
- OpenTelemetry.Instrumentation.Http (>= 1.14.0)
- OpenTelemetry.Instrumentation.Process (>= 1.12.0-beta.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.14.0)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Enrichers.Span (>= 3.1.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
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 |
|---|---|---|
| 1.2.24 | 46 | 4/21/2026 |
| 1.2.23 | 57 | 4/14/2026 |
| 1.2.22 | 58 | 4/10/2026 |
| 1.2.21 | 47 | 4/10/2026 |
| 1.2.20 | 51 | 4/10/2026 |
| 1.2.19 | 52 | 4/9/2026 |
| 1.2.18 | 63 | 4/2/2026 |
| 1.2.17 | 59 | 4/1/2026 |
| 1.2.16 | 59 | 4/1/2026 |
| 1.2.15 | 53 | 3/31/2026 |
| 1.2.14 | 55 | 3/30/2026 |
| 1.2.13 | 58 | 3/26/2026 |
| 1.2.12 | 72 | 3/24/2026 |
| 1.2.11 | 62 | 3/17/2026 |
| 1.2.10 | 56 | 3/16/2026 |
| 1.2.9 | 52 | 3/13/2026 |
| 1.2.8 | 71 | 3/9/2026 |
| 1.2.7 | 51 | 3/4/2026 |
| 1.2.6 | 75 | 2/19/2026 |
| 1.2.0 | 396 | 12/11/2025 |