Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't open localhost in Microsoft Edge (Project Spartan) in Windows 10 preview

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?

like image 617
sayingu Avatar asked May 19 '15 19:05

sayingu


People also ask

How do I open Microsoft edge in Windows 10?

How to start Microsoft Edge from the Run window. Press Win + R on the keyboard to open the Run window. In the Open field, type “microsoft-edge:” and press Enter on the keyboard or click or tap OK. Microsoft Edge is now open.

How do I enable Windows Edge?

Click on Apps. Click on Default apps. Under the "Web browser" section, click the default current application. Select the Microsoft Edge option.


2 Answers

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":

enter image description here

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.

like image 51
vcsjones Avatar answered Oct 13 '22 21:10

vcsjones


Microsoft Edge runs with network isolation by default for security reasons. To enable loopback and debug your localhost server run the following command from an elevated shell if you have 10158 or newer:

CheckNetIsolation LoopbackExempt -a -n=Microsoft.MicrosoftEdge_8wekyb3d8bbwe

or

checknetisolation loopbackexempt -a -p=S-1-15-2-3624051433-2125758914-1423191267-1740899205-1073925389-3782572162-737981194

or this one if you have an older version

CheckNetIsolation LoopbackExempt -a -n=Microsoft.Windows.Spartan_cw5n1h2txyewy

In a future update, you’ll be able to enable localhost loopback support using about:flags.

like image 44
Doris Chen Avatar answered Oct 13 '22 23:10

Doris Chen