Overview
Kestrel is a LIBUV-based, cross-platform ASP. NET Core Web server, LIBUV is a cross-platform asynchronous I/O library. The ASP. NET Core Project uses Kestrel as the Web server by default .
Users can use the kestrel alone, or with IIS, Nginx, Apache and other reverse proxy Server a piece of use; Microsoft has suggested that the latter be used, implicitly speaking
Program.cs
Public Static void Main (string[] args) { buildwebhost (args). Build (). Run ();} Public Static Iwebhostbuilder buildwebhost (string[] args) = webhost.createdefaultbuilder (args) . Usestartup<Startup> ();
. Usekestrel (options ={options. Limits.maxconcurrentconnections= -; Options. Limits.maxconcurrentupgradedconnections= -; Options. Limits.maxrequestbodysize=Ten*1024x768; Options. Limits.minrequestbodydatarate=NewMindatarate (Bytespersecond: -, GracePeriod:TimeSpan.FromSeconds (Ten)); Options. Limits.minresponsedatarate=NewMindatarate (Bytespersecond: -, GracePeriod:TimeSpan.FromSeconds (Ten)); Options. Listen (Ipaddress.loopback, the); Options. Listen (Ipaddress.loopback,5001, listenoptions ={Listenoptions.usehttps ("testcert.pfx","Testpassword"); });});
Document:
Microsoft Official:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.1&tabs= Aspnetcore2x
Nginx, or Apache
Kestrel:net Core cross-platform server