A note to self: dotnet core publishing

  1. When you run dotnet <appname.dll>, the system runs the app in the default server called Kestrel. More on it here.
  2. UseUrls("name:port"): By default, it runs the app on localhost:5000, but it can be changed to any given url with the use of: UseUrls("name:port") extension in the WebHostBuilder.
  3. UseKestrel(a => {}) allows to provide a number options including ssl:
  4.  Since Kestrel is limited, you might need to use a reverse proxy to have requests routed from port 80 or get more security and robustness (IIS, Nginx and Apache are supported)
  5. Publishing - simply filesystem publishing should suffuse if the app is run on the box from console.
  6. Publishing for IIS is more tricky - refer to this.

Comments