部署NETCORE在LINUX上报Error -99 EADDRNOTAVAIL address not available

时间:2022-12-12 20:12:02

Unable to bind to http://localhost:80 on the IPv6 loopback interface: 'Error -99 EADDRNOTAVAIL address not available'

报这个主要是URL的问题,在启动时指定URL就可以了:

.UseUrls("http://*:80")

需要注意的是,这里的URL不能用“http://localhost:80”,这样是错误的。原因现在还未知