0

So I'm trying to load my localhost file. I am guilty of modifying my host file I was wondering if anyone could tell me if any of the following could be the issue.

127.0.0.1 localhost
::1 localhost
127.0.0.1 localhost.localdomain   localhost

I do not have XAMPP or WAMP installed. I am trying to use Visual Studio Code to load a simple webpage (which is only using js and html) so I don't really want to install more software unless I need to.

Also if anyone can suggest other way of how I might go about finding what is the cause that would be appreciated.

Other details:

  • OS: Windows 10: Version 10.0.14393 Build 14393
  • Browsers: Chrome Version 56.0.2924.87 (64-bit) & possibly Edge (I haven't tried others)
5
  • So I understand your exact problem, you are unable to "debug" your website, from within Visual Studio. Is that correct?
    – Ramhound
    Feb 24 '17 at 19:14
  • I am unable to use localhost is my main problem. Feb 24 '17 at 19:24
  • But yes that's also another way of looking at it Feb 24 '17 at 19:24
  • If you don't have any software that is able to serve your "js and html" by listening for incoming connections on some port on localhost, how do you expect you can serve your content? With visual studio you need to run at least IIS. Run netstat -abno from elevated command prompt to see if any software really listening on localhost that is ready to serve your content
    – Alex
    Feb 24 '17 at 19:51
  • Used netstat -abno you are correct there isn't anything running. I guess because I saw the connection was refused I considered that to mean that something is there refusing it. Feb 25 '17 at 12:21
0

The below option helped me. I'm not sure if it will help you.

Go to chrome://flags and set "Built-in Asynchronous DNS" to "Disabled", then restart the browser.

This allows all local domains to be accessed. Looks like DNS was just choking up the issue.

Update: In new chrome versions,use reset all to default button as the option mentioned above is not available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.