Curiosus.Hosting.Web
3.0.0
dotnet add package Curiosus.Hosting.Web --version 3.0.0
NuGet\Install-Package Curiosus.Hosting.Web -Version 3.0.0
<PackageReference Include="Curiosus.Hosting.Web" Version="3.0.0" />
<PackageVersion Include="Curiosus.Hosting.Web" Version="3.0.0" />
<PackageReference Include="Curiosus.Hosting.Web" />
paket add Curiosus.Hosting.Web --version 3.0.0
#r "nuget: Curiosus.Hosting.Web, 3.0.0"
#:package Curiosus.Hosting.Web@3.0.0
#addin nuget:?package=Curiosus.Hosting.Web&version=3.0.0
#tool nuget:?package=Curiosus.Hosting.Web&version=3.0.0
Curiosus.Hosting.Web
Bootstrapper for ASP.NET Core apps built on Curiosus.Hosting:
YAML config with validation, NLog, Kestrel or IIS setup, thread pool tuning and app initializers, plus
ConfigureCuriosusMvc with the common MVC setup.
Installation
dotnet add package Curiosus.Hosting.Web
Usage
public class AppConfiguration : CuriosusWebAppConfiguration
{
public AppConfiguration()
{
AppName = "Sample Web App";
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
var configuration = services.BuildServiceProvider().GetRequiredService<AppConfiguration>();
services.ConfigureCuriosusMvc(configuration);
}
public void Configure(IApplicationBuilder app)
{
app.UseRouting();
app.UseEndpoints(endpoints => endpoints.MapControllers());
}
}
// Program.cs
var bootstrapper = new CuriosusWebAppBootstrapper<CuriosusCLIArguments, AppConfiguration, Startup>();
return await bootstrapper.RunAsync(args);
config.yml must set either Urls or a Kestrel section (not both), unless UseIISIntegration is true:
Urls: http://127.0.0.1:5000
Log:
LogConfigurationPath: ./NLog.config
LogOutputDirectory: ./logs
ThreadPool:
MinWorkerThreads: 64
SensitiveDataFieldNames:
- password
Kestrel is passed to Kestrel as is (e.g. Kestrel:Endpoints:Https:Url and Certificate:Path/Password).
ConfigureCuriosusMvc adds MVC with string trimming for bound values, localized model binding messages,
data annotations localization, Razor runtime compilation, IMemoryCache and a SensitiveDataProtector
for SensitiveDataFieldNames. Implement IWebAppConfigurationWithPublicDomain to require and register PublicDomain.
See also
- Curiosus.Hosting — bootstrappers for console tools and services
- Curiosus.Tools.Web — middleware, model binders and web helpers
- Sample web app
- Curiosus.Utils — all packages
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Curiosus.Hosting (>= 3.0.0)
- Curiosus.Tools.Web (>= 3.0.0)
- MailKit (>= 4.18.0)
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (>= 10.0.3)
- NLog.MailKit (>= 6.0.0)
- NLog.Web.AspNetCore (>= 6.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net9.0
- Curiosus.Hosting (>= 3.0.0)
- Curiosus.Tools.Web (>= 3.0.0)
- MailKit (>= 4.18.0)
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (>= 9.0.13)
- NLog.MailKit (>= 6.0.0)
- NLog.Web.AspNetCore (>= 6.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.