文章内容

2018/5/23 16:44:01,作 者: 黄兵

Error -99 EADDRNOTAVAIL address not available

最近项目部署到Ubuntu上的时候报如下错误:

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


出现问题的原因:

IPV6s回送的时候不可达。


解决问题的方案:

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

    host.Run();
}


分享到:

发表评论

评论列表