PiBox.Hosting.WebHost
0.9.9
See the version list below for details.
dotnet add package PiBox.Hosting.WebHost --version 0.9.9
NuGet\Install-Package PiBox.Hosting.WebHost -Version 0.9.9
<PackageReference Include="PiBox.Hosting.WebHost" Version="0.9.9" />
paket add PiBox.Hosting.WebHost --version 0.9.9
#r "nuget: PiBox.Hosting.WebHost, 0.9.9"
// Install PiBox.Hosting.WebHost as a Cake Addin #addin nuget:?package=PiBox.Hosting.WebHost&version=0.9.9 // Install PiBox.Hosting.WebHost as a Cake Tool #tool nuget:?package=PiBox.Hosting.WebHost&version=0.9.9
PiBox.Hosting.Webhost
PiBox.Hosting.WebHost is the core package
that allows dotnet dev's
to use the pibox web host and pibox 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 PiBox.Hosting.Generator # this is required so the web host can discover & load the plugins
dotnet add package PiBox.Hosting.WebHost
or add as package reference to your .csproj
<PackageReference Include="PiBox.Hosting.Generator" Version="" />
<PackageReference Include="PiBox.Hosting.WebHost" Version="" />
Rewrite the Entrypoint Program.cs to have following code:
using PiBox.Hosting.WebHost;
PluginWebHostBuilder.RunDefault(PiBox.Generated.PiBoxPluginTypes.All);
Config files and ENV vars
PiBox will try to load config files and values in the following order
appsettings*.json
appsettings*.yaml
appsettings*.yml
appsettings.json
appsettings.yaml
appsettings.yml
- 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
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:
PiBox.Hosting.WebHostPluginWebHostBuilder.RunDefault(PiBox.Generated.PiBoxPluginTypes.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
Metrics
Pibox uses open telemetry for it's metrics capabilities. Further info can be found here
Tracing settings
Pibox 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 to this host. it will also enrich the log messages with SpanIds and TraceIds.
tracing:
host: http://localhost:3333
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- AspNetCore.HealthChecks.System (>= 7.0.0)
- AspNetCoreRateLimit (>= 5.0.0)
- Chronos.Net (>= 2.0.24)
- NetEscapades.Configuration.Yaml (>= 3.1.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.5.1)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.5.0-rc.1)
- OpenTelemetry.Extensions.Hosting (>= 1.5.1)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.5.0-beta.1)
- OpenTelemetry.Instrumentation.Http (>= 1.5.0-beta.1)
- OpenTelemetry.Instrumentation.Process (>= 0.5.0-beta.3)
- OpenTelemetry.Instrumentation.Runtime (>= 1.5.0)
- PiBox.Hosting.Abstractions (>= 0.9.9)
- Serilog.AspNetCore (>= 7.0.0)
- Serilog.Enrichers.Span (>= 3.1.0)
- Serilog.Enrichers.Thread (>= 3.1.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.0.73 | 41 | 10/22/2024 |
1.0.66 | 111 | 10/15/2024 |
1.0.64 | 71 | 10/14/2024 |
1.0.61 | 87 | 10/1/2024 |
1.0.60 | 81 | 9/27/2024 |
1.0.54 | 166 | 4/30/2024 |
1.0.51 | 177 | 2/27/2024 |
1.0.49 | 58 | 2/27/2024 |
1.0.47 | 83 | 2/21/2024 |
1.0.45 | 67 | 2/20/2024 |
1.0.43 | 78 | 2/13/2024 |
1.0.41 | 68 | 2/13/2024 |
1.0.39 | 73 | 2/8/2024 |
1.0.38 | 74 | 2/8/2024 |
1.0.37 | 67 | 2/8/2024 |
1.0.35 | 70 | 2/2/2024 |
1.0.32 | 70 | 1/30/2024 |
1.0.25 | 138 | 12/27/2023 |
1.0.23 | 87 | 12/19/2023 |
1.0.22 | 77 | 12/19/2023 |
1.0.21 | 71 | 12/19/2023 |
1.0.19 | 83 | 12/11/2023 |
1.0.17 | 121 | 11/23/2023 |
1.0.7 | 80 | 11/23/2023 |
1.0.5 | 80 | 11/23/2023 |
1.0.3 | 81 | 11/23/2023 |
1.0.0 | 85 | 11/21/2023 |
0.9.9 | 75 | 11/21/2023 |
0.9.7 | 82 | 11/21/2023 |
0.9.6 | 96 | 11/21/2023 |