0

I connected two laptops together with a wi-fi modem.

  • Laptop1 got the IP 192.168.0.20
  • Laptop2 got the IP 192.168.0.21

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 Ping 0.21 from 0.20

The result of ping 192.168.0.21 from laptop1 Ping 0.20 from 0.21

When I call my API from the laptop2(localhost) there is no problem and I see the result My API call

The problem is when I call API from laptop1(another laptop), after a long time I see this enter image description here

I can't find what my problem is.

Saeid Amini
  • 1,313
  • 5
  • 16
  • 26
  • 1
    port should be open as well – Yehor Androsov Sep 18 '20 at 19:52
  • What web server are you running? It's possible to listen on only on the local loopback IP address, and not on your network IP address. Can you get to http://192.168.0.21:... from Laptop2? In Powershell you can run `[System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties().GetActiveTcpListeners()` to list the listining IP, Port pairs. `0.0.0.0` means All IPs. – David Browne - Microsoft Sep 18 '20 at 19:53
  • If you're using IIS Express, have a look at all the answers [here](https://stackoverflow.com/questions/3313616/how-to-enable-external-request-in-iis-express) but [this one](https://stackoverflow.com/a/29971694/729541) in particular. – John H Sep 18 '20 at 19:55

2 Answers2

1

Make sure door 44382 is open in the firewall.

Create new rule in/out for port here (advanced configs of firewall)

1

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.

jtucker13
  • 58
  • 7