Microsoft Edge is not able to recognize localhost

By design Issue #16262643

Details

Author
Nadeesha P.
Created
Mar 7, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

My localhost is accessible among all browsers except Microsoft edge, every local domain was failed. and I tried every thing I can and still it is not able to run. Any solutions for that?

My current Windows version is 1709 (OS Build 16299.15).

Attachments

1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Are there any changes to your hosts file for localhost?  C:Windows\System32\drivers\etc\hosts

    Will you open a Command Prompt and see what DNS is returning for localhost?

    nslookup localhost

    Does the IP match what is your actual IP?

    ipconfig

    Steve

  • Hi Steve,

    There were no changes to hosts file. But the nslookup gives timeout error.

    Server: router.asus.com
    Address: 192.169.1.1

    DNS request timed out.
    timeout was 2 seconds.
    DNS request timed out.
    timeout was 2 seconds.
    *** Request to router.asus.com timed-out.

    and section for localhost in the hosts file as below

    localhost name resolution is handled within DNS itself.

    127.0.0.1 localhost

    ::1 localhost

  • Is router.asus.com supposed to be your DNS server?  Are you on a corporate network?  The 192.169.1.1 is not a valid private IP address.  Did you mean 192.168.1.1?

    We should also verify that the DNS services are running.  I will need to look up the required services and get back to you.  I know one service is the ‘Dnscache’ which is the DNS Client.  I do not recommend modifying the registry unless absolutely necessary.  I would take option two in the following link.  First, just verify whether the service is running.

    https://superuser.com/questions/1277952/how-to-troubleshoot-a-windows-10-service-which-does-not-let-me-stop-it

    Can you try the same test after switching to a Wifi network if you are on ethernet and vice versa?

    Is your Ethernet and/or Wifi set to use DHCP?  Is your router set to provide a DNS server if your system does not?

    There are a number of other items to check.  Let’s start with those.  :)

  • router.asus.com is obtain automatically and my pc is set up corporate proxy but it is linked with outside network. If the pc is connected corporate network, it will show Non-existent domain.

    Corporate network is set up proxy, however, without proxy local host is still unable to be reached. Switching networks did not resolve

    DNS client service is running and DHCP is enabled.

    Moreover, the local domains are accessible in internet explore as well. They are unreachable only using edge or UWP apps.

    I have set up my preferred dns ip to 127.0.0.1, but it is still not reached

  • I forgot to add one more thing, option two did not work. startup type drop down is still disabled

  • Option one did not work as well…!

  • Hi Nadeesha,

    I had forgotten that basic loopback access has been disabled for security purposes for Windows Store apps and any application running in the new App Container model, which Edge does.  On my system, I disabled this for various testing and then forgot about it.  Apologize for forgetting about that. :-/

    However, if you still can not access localhost after trying the items below, you should ask a network administrator to see if localhost is blocked on purpose.

    Here is a link for information about the security feature changes in Edge.  Search for the section “All web content runs in an app container sandbox.”

    https://docs.microsoft.com/en-us/microsoft-edge/deploy/security-enhancements-microsoft-edge

    The following is information on how to enable localhost loopback access in Windows.

    First you should verify if you have the option selected in Edge’s about:flags settings page.  I have attached a screenshot for that as well.

    See this article for information about enabling loopback for side-loaded Windows Store apps.
    https://docs.microsoft.com/en-us/previous-versions/windows/apps/dn640582(v=win.10)

    Commands to enable/disable loopback from command Prompt.
    https://msdn.microsoft.com/en-us/windows/hh780593.aspx

    The easiest way that I know of is to install Fiddler4 and use its “WinConfig” button.  See the attached screenshot.

    Links for security information on the security risk of enabling localhost loopback.
    https://security.stackexchange.com/questions/96418/localhost-loopback-risk
    https://security.stackexchange.com/questions/155857/what-are-the-security-risk-of-enabling-cors-on-localhost

    The last link, look for the second answer that starts with “No, this is NOT…”

    Steve

  • Microsoft Edge Team

    Changed Status to “By design”

  • localhost works with Chrome, Opera, Internet Explorer, and probably Firefox, but not with Edge. Edge does not work even when Edge is selected by Microsoft Visual Studio as the browser to debug a web project.

You need to sign in to your Microsoft account to add a comment.

Sign in