ASP.NET Core - remote access from smartphone

不羁的心 提交于 2020-08-10 05:28:12

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/50549389/asp-net-core-remote-access-from-smartphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!