无法在 Windows 10 预览版的 Microsoft Edge (Project Spartan) 中打开 localhost [英] Can't open localhost in Microsoft Edge (Project Spartan) in Windows 10 preview

查看:24
本文介绍了无法在 Windows 10 预览版的 Microsoft Edge (Project Spartan) 中打开 localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Windows 10 预览版并安装了 IIS.

在 Project Spartan 中打开 提供并使用 同意.

如果您使用的是以前版本的 Windows 10,则可以使用 CheckNetIsolation 工具将其添加到 LoopbackExempt 列表中.在提升的命令提示符下使用它:

CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

Microsoft.MicrosoftEdge_8wekyb3d8bbwe 是 Edge 应用的标识符.它可以通过在 PowerShell 中使用 Get-AppxPackage 并筛选 Spartan/Edge 的结果并使用 PackageFamilyName 来确定.

自 Build 10158 起,PackageFamilyName 已从 Microsoft.Windows.Spartan_cw5n1h2txyewy 更改为 Microsoft.MicrosoftEdge_8wekyb3d8bbwe.

I installed Windows 10 preview and installed IIS.

Open "http://localhost" in Project Spartan can't connect.

IE has no problem. What's the problem?

解决方案

So the issue is Spartan Edge doesn't have access to the loopback addresses, which is something that most Windows Store apps are blocked from accessing.

If you are using Windows 10 RTM or build 10166, this can be done by navigating to about:flags and checking "Allow localhost loopback":

Image courtesy of Ryan Joy and used with consent.

If you are using a previous build of Windows 10, the CheckNetIsolation tool can be used to add it to the LoopbackExempt list. Use this from an elevated command prompt:

CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

Microsoft.MicrosoftEdge_8wekyb3d8bbwe is the identifier for the Edge app. It can be determined by using Get-AppxPackage in PowerShell and sifting through the results for the Spartan / Edge and using the PackageFamilyName.

As of Build 10158, the PackageFamilyName has changed from Microsoft.Windows.Spartan_cw5n1h2txyewy to Microsoft.MicrosoftEdge_8wekyb3d8bbwe.

这篇关于无法在 Windows 10 预览版的 Microsoft Edge (Project Spartan) 中打开 localhost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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