Error -99 EADDRNOTAVAIL address not available

2222 단어 C#
원문 주소:https://pdf-lib.org/Home/Details/4836

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();
}

좋은 웹페이지 즐겨찾기