Localhost not found (404) iis

asp.netiislocalhostvisual studio 2012

I am having several issues with the DNS localhost on my computer.

Some instruction is redirecting all my explorers, including visual studio somewhere else than 127.0.0.1 when I visual studio or any browser looks for localhost.

Where can such thing be happening? I recently changed my hosts file to point localhost somewhere else, but then it did not work so I switched it back, so that cant be the problem.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost

I have also unistalled and installed IIS, so is not a problem of iis not redirecting properly..

I am not being able to run Visual Studio solutions because of this problem.

I have tried pining 127.0.0.1 and it responds, I have also tried localhost and it also works, but when I type localhost on a browser it redirects to a "404" page.

Best Answer

Make sure that IIS is actually configured to listen on 127.0.0.1 (perhaps you removed the binding previously?)

netsh http show iplisten
IP addresses present in the IP listen list: 127.0.0.1

You can add additional IPs like so:

netsh http add iplisten ipaddress=10.0.0.10

Related Topic