Answer the question
In order to leave comments, you need to log in
How to make ASP.NET Core API available to computers on local network?
Good afternoon, comrades! The following question arose:
All events occur in Windows 10
1) I deploy the API on ASP.NET Core on a computer that is connected to the router via wi-fi.
2) It runs on the port https://localhost:5003 and is accessible from the same computer
3) On this computer, I enter the address https://localhost:5003 in
netsh http add urlacl url= https://localhost:5003 user=All (Russian version, so Everyone)
4) I disable the NOD32 firewall on all computers
5) I'm trying to reach the API from a computer that is connected by wire to the same router by wire. In response, silence.
What did not do:
netsh firewall add portopening TCP 5003 IISExpressWeb enable ALL
But I have Kestrel so I don't know if I need to do this or not.
What am I missing? Thank you all in advance for your replies!
Answer the question
In order to leave comments, you need to log in
localhost binds 127.0.0.1 (IPv4) and [::1] (IPv6), and both of these addresses are occupied by a virtual loopback network interface , which can only be reached from the machine on which it is raised (i.e. only locally).
Of the options you have:
a) Proxy localhost:5003 to the external IP address of the machine
b) Bind not this address to the external address of the machine. The external address can be found through:
ipconfig -all
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question