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?
c# - Problem sending HTTP request to Docker container - Stack Overflow
Articles related to this article
comment list (0)
- No comments so far