3

I tried to configure access to the ASP.NET Core application through the IP address of my computer. Whenever I tried to access a website through my smartphone, I was getting an error ERR_CONNECTION_TIMED_OUT. I did everything exactly as described in numerous similar questions/answers on Stack Overflow, but they doesn't help to solve my problem.

Here is part of my applicationhost.config:

...
<bindings>
       <binding protocol="http" bindingInformation="*:8080:192.1XX.XX.XX" />
       <binding protocol="http" bindingInformation="*:8080:localhost" />
       <binding protocol="http" bindingInformation="*:62641:localhost" />
</bindings>
...

I also tried several another ports and tried to use IP addresses from both Wi-Fi and Ethernet. If I try to access the site through the IP address from the computer on which the application is running, then everything works. But it does not work from my smartphone.

I deployed my application with IIS Express. My smartphone is connected to the Wi-Fi router to which the computer is connected too, so both devices are in the same network.

What might be the problem?

deralbert
  • 856
  • 2
  • 15
  • 33
  • Try publish your asp.net core application and host it using IIS instead of IIS express then you should be able to access your app on public IP address on your smartphone – Mohsin Mehmood May 27 '18 at 09:20
  • Some routers simply drop packets from one machine to the other. You need to review your router settings. Also learn how to use a tool like Wireshark on IIS Express to capture incoming packets. That can tell if your router works correctly. – Lex Li May 27 '18 at 09:42
  • In my Visual Studio, there is no way to select IIS instead of IIS express. At least, I can see only IIS Express. Lex Li - thanks, i try it. – deralbert May 27 '18 at 10:48

1 Answers1

5

We made a free VS Extension called Conveyor (Tools -> Extensions) or here https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti

With it you don't have to change any configuration, it just runs in the background and gives you a port you can use remotely, and also it can tunnel to the internet so you have a public URL if you like.

Jim W
  • 4,866
  • 1
  • 27
  • 43