3 files have to changed appsettings.json
(see the last section - kestrel ), launchsettings.json
- applicationurl commented out, and a 2 lines change in Startup.cs
Add below code in appsettings.json
file and port to any as you wish.
},
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5003"
}
}
}
}
Modify Startup.cs
with below lines.
using Microsoft.AspNetCore.Server.Kestrel.Core;
services.Configure<KestrelServerOptions>(Configuration.GetSection("Kestrel"));