Bry*_*can 2 asp.net iis localhost visual-studio-2012
我的计算机上的 DNS 本地主机遇到一些问题。
当我 Visual Studio 或任何浏览器查找 localhost 时,某些指令会重定向我的所有资源管理器,包括 Visual Studio 127.0.0.1 以外的其他位置。
哪里会发生这样的事?我最近更改了主机文件以将 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”页面。
我也遇到了这个问题,结果发现这是 IIS 中默认网站绑定的问题。我已将“主机名”指定为服务器的域名,这意味着外部访问工作正常,但尝试通过 localhost 访问任何 IIS 页面会返回浏览器 404 错误。
只需清除“主机名”字段并将其留空即可解决我的问题。
| 归档时间: | 
 | 
| 查看次数: | 22868 次 | 
| 最近记录: |