About PowerServer Web APIs and Kestrel

Kestrel is the default web server used for ASP.NET Core applications. Whenever a new ASP.NET Core project (such as the ServerAPIs project in the PowerServer C# solution) is created, it includes the Kestrel web server by default. The Kestrel web server provides better request processing performance to ASP.NET Core applications as it is an open-source, cross-platform and light-weight web server; but it does not have advanced features of web servers like IIS, Nginx, Apache etc.

As Kestrel is automatically included and enabled in the PowerServer Web APIs, there is no need to install or configure Kestrel.

In the PowerServer C# solution > ServerAPIs project > Properties > launchSettings.json file, the commandName key has the value Project which indicates that the Kestrel web server will be launched; and the applicationUrl key specifies the host name and port number for Kestrel. For a detailed description of the settings in launchSettings.json, see https://docs.microsoft.com/aspnet/core/fundamentals/environments#development-and-launchsettingsjson.

    "ServerAPIs": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://0.0.0.0:5000/"
    }

Note

Keep in mind that the launchSettings.json file is used only when you run PowerServer Web APIs and Kestrel in the local development environment, for example, when PowerServer Web APIs is directly run from SnapDevelop, VisualStudio, or by using .NET Core CLI. And this file will not be included when PowerServer Web APIs is published to the production server.

For how to run the PowerServer Web APIs on Kestrel in the local development environment, refer to Run the PowerServer Web APIs (in development environment).

For how to publish and run PowerServer Web APIs on Kestrel in the production environment (where launchSettings.json is not included), refer to Running Web APIs on Kestrel (in production environment).

For more details about Kestrel web server implementation in ASP.NET Core, see https://docs.microsoft.com/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-6.0.