我的计算机上的DNS本地主机有几个问题。
当我在visual studio或任何浏览器中查找localhost时,某个指令正在重定向我所有的资源管理器,包括visual studio 127.0.0.1以外的其他地方。
这样的事情会发生在哪里呢?我最近把我的hosts文件改成了指向其他地方的localhost,但是后来它不起作用了,所以我把它换回来了,所以这不可能是问题。
# 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我也已经卸载并安装了IIS,所以不是iis重定向不正确的问题。
由于此问题,我无法运行Visual Studio解决方案。
我试过pining 127.0.0.1,它响应了,我也试过localhost,它也可以工作,但是当我在浏览器上输入localhost时,它会重定向到一个"404“页面。
发布于 2014-12-31 03:34:05
确保IIS实际配置为监听127.0.0.1 (也许您之前删除了绑定?)
netsh http show iplisten
IP addresses present in the IP listen list: 127.0.0.1
您可以添加额外的IP,如下所示:
netsh http add iplisten ipaddress=10.0.0.10
发布于 2018-08-08 08:57:51
我也遇到了这个问题,结果是IIS中默认Web站点的绑定出现了问题。我将"Host Name“指定为服务器的域名,这意味着外部访问工作正常,但尝试通过localhost访问任何IIS页面时都会返回浏览器404错误。
发布于 2020-03-26 03:11:43
https://stackoverflow.com/questions/21241709
复制相似问题