Windows Phone 8模拟器:访问localhost

bri*_*hah 14 localhost windows-phone windows-phone-8

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

SLa*_*aks 24

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.

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

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


jum*_*tyn 8

我也在寻找这方面的答案,并发现微软现在有一个正式答案:

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580%28v=vs.105%29.aspx