【发布时间】:2019-09-21 14:06:22
【问题描述】:
使用 VS2019
处于开发模式。为什么我必须先监听 5001 端口,然后再将 5000 端口重定向到 44340?
WebHost.CreateDefaultBuilder()
.UseSetting("sslPort", "44340")
.UseSetting("Urls", "https://localhost:5001;http://localhost:5000")
.UseStartup<CWebAPI>();
如果我将 5001 更改为 44340,这是我收到的错误消息。
'Failed to bind to address https://localhost:44340.'
为什么我不能将端口 5001 更改为 44340?
【问题讨论】:
标签: .net-core asp.net-core-webapi self-hosting