ASP.NET Core-从智能手机进行远程访问 [英] ASP.NET Core - remote access from smartphone

查看:316
本文介绍了ASP.NET Core-从智能手机进行远程访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过计算机的IP地址配置对ASP.NET Core应用程序的访问.每当我尝试通过智能手机访问网站时,都会出现错误ERR_CONNECTION_TIMED_OUT.我所做的一切都完全按照关于Stack Overflow的许多类似问题/答案中的描述进行,但它们无助于解决我的问题.

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.

这是我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>
...

我还尝试了其他几个端口,并尝试使用Wi-Fi和以太网的IP地址.如果尝试从运行应用程序的计算机通过IP地址访问该站点,则一切正常.但这在我的智能手机上不起作用.

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.

我使用IIS Express部署了我的应用程序.我的智能手机也已连接到计算机所连接的Wi-Fi路由器,因此两个设备都在同一网络中.

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.

可能是什么问题?

推荐答案

我们制作了一个免费的VS扩展程序,称为Conveyor(工具->扩展程序),或者在此处

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

有了它,您无需更改任何配置,它仅在后台运行,并为您提供可以远程使用的端口,并且它可以通过隧道传输到Internet,因此您可以使用公共URL.

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.

这篇关于ASP.NET Core-从智能手机进行远程访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆