.net core 设置启动指定端口
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).UseUrls("http://*:5001") //直接指定端口
.Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}