title: Using appsettings.json to configure Kestrel listen port Dotnet core 2 preview 2
body: <p>From what I understand the correct way of setting listen ports for ASP Dotnet Core 2 preview 1/2 is by creating a Kestrel section in the appsettings.json in the following format:</p>
  
  <pre><code>"Kestrel": {
      "EndPoints": { //Could also be Endpoints, it's a bit unclear
          "Http": {
          "Address": "127.0.0.1",
      "Port": 9001 //the port you want Kestrel to run on
  },
  </code></pre>
  
  <p>I have tried to set up the sample webapp on a Debian machine, but when I start the app, it writes out that the app is listing on port 5000, the default port..</p>
  
  <p>I know that the appsettings.json is read, because when I change the logging level to Trace, I get more info upon startup, including that no Endpoints are found and the app will use the standard 5000 port.</p>
  
  <p>I have tried to search the aspnet source code on Github, and I can find a area where the Kestrel section is read from configuration (<a href="https://github.com/aspnet/Identity/blob/e38759b8a2de1b7a4a1c19462e40214b43c1cf3b/samples/IdentityOIDCWebApplicationSample/MetaPackage/KestrelServerOptionsSetup.cs" rel="noreferrer">https://github.com/aspnet/Identity/blob/e38759b8a2de1b7a4a1c19462e40214b43c1cf3b/samples/IdentityOIDCWebApplicationSample/MetaPackage/KestrelServerOptionsSetup.cs</a>), but as you can see it looks like a sample project.</p>
  
  <p>What am I missing, isn't this the standard way to configure Kestrel in ASP Dotnet core 2?</p>