我的膝上型电脑中有一个ASP.net Web,地址如下:
本地主机:99949
我将它添加到IIS Express中,这样我可以从同一局域网网络中的另一台计算机访问我的web Api,它将这样做:
尼米斯:80
我可以从其他个人电脑上访问我的网络api,但是当我试图用我的android设备访问它时,它会显示“网页不可用”错误。
我关掉了所有的防火墙。
我该怎么做才能修好它?
发布于 2015-02-12 18:20:53
您需要在防火墙中为端口80添加一个入站规则(或在IIS上为您的网站使用的任何端口):
Go to Control Panel, Windows Firewall
Select Inbound Rules
Add a New Rule
Select "Port" as a Rule Type
Select "TCP and put "80" (and any other ports you want to open) in "Specific local ports"
Select "Allow the connection"
Select the network location where the rule should apply
Give a name and an optional description之后,您应该能够使用http://computername (例如http://myhomepc)从同一网络中的其他设备访问您的站点。
但是,您可能需要在Android中使用服务器机器的IP。它似乎总是使用谷歌的服务器覆盖它的DNS条目。在本例中,尝试按照解释的这里修改DNS设置。
发布于 2019-05-21 23:07:45
我也遇到了同样的问题,这是我的解决方案,无需在FireWall或任何其他设置中更改任何内容:
https://stackoverflow.com/questions/19121479
复制相似问题