I connected two laptops together with a wi-fi modem.
I launched an ASP.Net Core web application on Laptop2 on port 44382. I turned off both laptops' firewalls.
The result of ping 192.168.0.20
from laptop2
The result of ping 192.168.0.21
from laptop1
When I call my API from the laptop2(localhost) there is no problem and I see the result
The problem is when I call API from laptop1(another laptop), after a long time I see this
I can't find what my problem is.
You're most likely using IIS Express, which doesn't automatically bind everything the way you need for remote access. This answer breaks down what you'll need to accomplish that fairly well, but you may just want to look at installing IIS.