c# - Problem sending HTTP request to Docker container - Stack Overflow

I started the docker container with the command docker run -d -p 6000:5000 webapi , it runs a C# ASP.NE

I started the docker container with the command docker run -d -p 6000:5000 webapi , it runs a C# ASP.NET Core application on the localhost:5000 port. When I try to send a GET request to the URL http://localhost:6000/api/Users on the host machine using Postman (It should just return the entire list of users), it says Error: socket hang up. If you go inside the container and try to send the same GET request to the specified URL only with port 5000, everything will work. What could be the problem?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745672518a4639491.html

相关推荐

  • c# - Problem sending HTTP request to Docker container - Stack Overflow

    I started the docker container with the command docker run -d -p 6000:5000 webapi , it runs a C# ASP.NE

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信