I\'ve got an ASP.NET Core 2.0 app which I intend to run as a stand-alone application. The app should start up and bind to an available port. To achieve this I configure the
I was able to do it in the StartUp.cs using the following code:
int Url = new System.Uri(Configuration["urls"]).Port;