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

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

问题描述

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

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天全站免登陆