.Net Core API start URL

Viewed 2264

This is my Program.cs:

public static void Main(string[] args)
{
    var host = new WebHostBuilder()
        .UseKestrel()
        .UseContentRoot(Directory.GetCurrentDirectory())
        .UseUrls("http://localhost:9020")
        .UseIISIntegration()
        .UseStartup<Startup>()
        //.UseApplicationInsights()
        .Build();

    host.Run();
}

which used to run on port 9020 as specified under UseUrls(). For some reason now when I start the program, it gets served on port 54033 and the only thing (I think) I've changed is adding:

<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>

to my .csproj for release, but I don't see how that should affect the port on which the service is running. Is there somewhere else I can check for the issue?

1 Answers
Related