Codesmell
Codesmell

Reputation: 379

Hosts file not working properly

I have a site on my test machine I want to bind into IIS with hosts file.
It's not that I haven't done it before, but this time the page is blank when I load it and chrome says the web page is not available.
In the dev tools Network tab I get ERR_NAME_NOT_RESOLVED and the weird part is that I've entered a domain name in hosts file associated with 127.0.0.1 address. The same site loads when I add virtual directory and access it via localhost.

UPDATE
Screenshoot of the web site, bindings and dev tools network tab.
http://oi59.tinypic.com/6zsfau.jpg

I have also tried loading with Firefox and IE, but same results.
Have no idea what might be the problem.

Upvotes: 0

Views: 2598

Answers (1)

Avner
Avner

Reputation: 4556

Here's 3 options I can think of:

  1. Check that your binding in iis is set to "All Unassigned" for the IP address (displays in IIS as "*")
  2. Alternatively bind to a specific ip address and use that ip address in the hosts file
  3. Check that your hosts file encode in ANSI

hope this helps

Upvotes: 2

Related Questions