如何将net core 6.0 的默认端口5000端口转移到别的端口?

众所周知,对于5.0及其以下的版本,如果想将web发布的默认端口5000端口转移到别的端口,可以在Program.cs文件中,添加UseUrls的属性。

   webBuilder.UseStartup<Startup>().UseUrls("http://*:86");

img

但在,net core 6.0的版本中,已经没有了起动配置,该如何配置默认的启动端口呢?

img

试试


试试其他方法看看
5 ways to set the URLs for an ASP.NET Core app In this post I describe 5 different ways to set which URLs your ASP.NET Core application listens on. https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/

img

https://blog.csdn.net/u010584641/article/details/79525535