Base library for .NET Core API services.
Base library for .NET Core self-hosted API services. Provide all neccesary services for Web API like swagger documentation, healthcheck and metrics endpoints.
- .NET 6.0 runtime and above
- MSVS 2022
Create new Host class:
public class Host : Server.Host { }
Define overrides int Startup class:
public class Startup : Server.Startup { }
/
show default Web API page/swagger
show SwaggerUI API Reference Documentation/env
exposes environment information about the application e.g. OS, Machine Name, Assembly Name, Assembly Version etc.
Install script
sc create "AspNet.WebApi.Server.Example" binpath= "dotnet %CD%\AspNet.WebApi.Server.Example.dll --run-as-service true" start= auto
sc start "AspNet.WebApi.Server.Example"
uninstall script
sc stop "AspNet.WebApi.Server.Example"
sc delete "AspNet.WebApi.Server.Example"