Windows Phone 8 模拟器:访问本地主机 [英] Windows Phone 8 Emulator: Access localhost

查看:25
本文介绍了Windows Phone 8 模拟器:访问本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 VS 2012 默认模板创建了 MVC4 移动应用程序.它在使用 http://localhost/mvcapplication1/ 的桌面浏览器中运行良好,但是当我尝试在 WP8 Emulator 浏览器中运行相同的应用程序时,它无法正常工作并显示消息我们无法显示此页面".我也尝试过使用 IP 地址 (127.0.0.1) 但仍然没有运气.请告诉我如何使用 WP8 Emulator 浏览器连接到本地主机?

I created MVC4 Mobile Application using VS 2012 default template. It's working fine in desktop browser using http://localhost/mvcapplication1/ but when I tried running the same app in WP8 Emulator browser it's not working and showing message "We're having trouble displaying this page". I also tried with IP address (127.0.0.1) but still no luck. Please tell me how can I connect to localhost using WP8 Emulator browser?

推荐答案

Windows Phone 8 模拟器实际上是一个完整的虚拟机,拥有自己的内部 IP 地址.
因此,localhost 表示(虚拟)电话,而不是您的 PC.

The Windows Phone 8 emulator is actually a full virtual machine with its own internal IP address.
Therefore, localhost means the (virtual) phone, not your PC.

要连接到主机 PC,您需要输入其内部 IP 地址.

To connect to the host PC, you need to enter its internal IP address.

您还需要配置 IIS Express 和防火墙以接受来自其他计算机的连接.

You also need to configure IIS Express and your firewall to accept connections from other computers.

这篇关于Windows Phone 8 模拟器:访问本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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