dotnet/aspnetcore

IIS Express doesn't accept port less than 44300

Closed this issue · 1 comments

it's very strange, is there some kind of rule that the ssl port can't be less than 44300?

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:54277/",
      "sslPort": 44300 <--- why i can't set this one to something less than this number?
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Axceligent.Ppms": {
      "commandName": "Project",
      "launchBrowser": true,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

i tested it out with 44300 and 44299 (just one port different) or even kestrel port 5001 doesnt' work. i also made sure the port is not in use.
image

if i choose any port less than 44300 even the asp.net core application isn't launch so there isn't any application to listen to the port. but if i do the same with command line i can run the project. as you can see the port that is set is 5001 which works fine if i run with command line, but the same port won't work with iis.

even the iis launch correctly
image

but the dotnet core die silently

Yes, IIS Express pre-reserves 44300-44399 at install time and registeres it's certificate to those ports. HTTP can use any port but HTTPS is restricted to those ports.