无法从 x-ms-webview 访问本地主机

Unable to access localhost from x-ms-webview

我的 WinJS 中有这段代码 default.html:

<x-ms-webview src="http://localhost/"></x-ms-webview>
<x-ms-webview src="http://display/"></x-ms-webview>
<x-ms-webview src="http://192.168.1.2/"></x-ms-webview>

display在hosts文件中定义:

127.0.0.1 display

192.168.1.2 -- 成功 -- 是网络上的另一台计算机。

这是我的 appx.manifest:

displaylocalhost 成功加载桌面上的 IE metro。

我的 OS 是 Windows 8.1 企业版。我还完全禁用了 Windows 防火墙,但没有任何效果。

我还能做什么?

Microsoft 阻止与本地计算机的连接,但 Visual Studio 调试器的 while 运行 除外。[1]

但是,有一个变通工具。引用自 this post on an MSDN blog:

Immersive applications (and IE11 on the Desktop) run inside isolated processes known as “AppContainers.” By default, AppContainers are forbidden from sending network traffic to the local computer (loopback).
[...]
I have built a GUI tool that allows you to very easily reconfigure an AppContainer to enable loopback traffic. This tool requires Windows 8 and runs on the .NET Framework v4. When launched, the utility scans your computer’s AppContainers and displays them in a list view. Each entry has a checkbox to the left of it, indicating whether the AppContainer may send loopback traffic. You can toggle these checkboxes individually, or use the buttons at the top to set all of the checkboxes at once. Click Save Changes to commit the configuration changes you’ve made, or click Refresh to reload the current configuration settings.

上述独立工具可从 here 获得。