简体   繁体   English

手机访问本地IIS上的网站

[英]Access website on a local IIS from a mobile phone

我在本地 IIS 服务器上上传了我的 ASP.NET 网站 我使用的是 Windows 8.1 pro,并想通过另一台 PC 和手机(Windows 手机或安卓)访问该网站 我想知道如何配置我的网络和我的服务器虽然做

First, both devices should be in the same network.首先,两个设备应该在同一个网络中。 Then hit windows key and type "Windows Defender Firewall".然后点击 Windows 键并输入“Windows Defender 防火墙”。 In advance settings, you can add a new Inbound rule.在预先设置中,您可以添加新的入站规则。 Next, select the port option and give your port number.接下来,选择端口选项并提供您的端口号。 After creating a new Inbound rule you can connect using the IP address and port.创建新的入站规则后,您可以使用 IP 地址和端口进行连接。 eg: 192.168.8.102:8000

显然我愚蠢的bitdefender是问题所在,尽管我尝试禁用它的防火墙,但显然它不会停止提供自己的最后一部分,直到您完全卸载它再次感谢您的帮助

  1. you have to find your iis machines' ip address - you can use service like: http://www.whatismyip.com/你必须找到你的 iis 机器的 ip 地址 - 你可以使用如下服务: http : //www.whatismyip.com/

  2. open your firewall port for whatever port you set for the website in iis.为您在 iis 中为网站设置的任何端口打开防火墙端口。 (Firewall port opening tutorial: http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7 ) (防火墙端口开启教程: http : //windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7

  3. then on your another pc or mobile, just navigate using the ip you found on setp 1 with the port number you set on iis.然后在您的另一台电脑或手机上,只需使用您在 setp 1 上找到的 ip 和您在 iis 上设置的端口号进行导航。

I was using MachineName:Port , thus was not working.我正在使用MachineName:Port ,因此无法正常工作。 When using MachineIP:Port it works, however.但是,当使用MachineIP:Port它可以工作。 I found that mobile cannot resolve the ip of machine using its name, as a normal PC can do (PC's Chrome works using machine name, but Android's one does not work unless using explicit IP).我发现移动设备无法像普通 PC 一样使用其名称解析机器的 ip(PC 的 Chrome 使用机器名称工作,但除非使用显式 IP,否则 Android 的 Chrome 无法正常工作)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM