[英]Want to connect to a local site hosted in IIS from the emulator, not localhost though
I want to access www.example.com locally hosted site in IIS.我想在 IIS 中访问 www.example.com 本地托管站点。 Added entry in host file for mapping www.example.com to 127.0.0.1.在主机文件中添加了用于将 www.example.com 映射到 127.0.0.1 的条目。 Not able to access it using Android emulator.无法使用 Android 模拟器访问它。
Tried 10.0.2.2 as well in emulator.在模拟器中也尝试过 10.0.2.2。 http://10.0.2.2
this address is accessing the default website of IIS. http://10.0.2.2
这个地址是访问IIS的默认网站。 But not able to access newly added site www.example.com.但无法访问新添加的站点 www.example.com。 Working fine for desktop browsers.适用于桌面浏览器。
您可以使用安全隧道使您的本地 ip 在线说“ http://10.0.2.2 ”。您可以使用Ngrok它使您的 ip/(发布在该本地 ip 上的站点)在线可用,以便您能够访问您的网站在线
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.