gpt4 book ai didi

asp.net - 找不到本地主机 (404) iis

转载 作者:行者123 更新时间:2023-12-05 09:23:29 26 4
gpt4 key购买 nike

我的计算机上的 DNS localhost 有几个问题。

当我的 visual studio 或任何浏览器查找 localhost 时,一些指令正在重定向我的所有浏览器,包括 127.0.0.1 以外的其他地方的 visual studio。

哪里会发生这种事?我最近更改了我的主机文件以将 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 解决方案。

我试过固定 127.0.0.1 并且它有响应,我也试过 localhost 并且它也有效,但是当我在浏览器上键入 localhost 时它会重定向到“404”页面。

最佳答案

确保 IIS 实际上配置为监听 127.0.0.1(也许您之前删除了绑定(bind)?)

netsh http show iplisten<br/>
IP addresses present in the IP listen list:
127.0.0.1

您可以像这样添加额外的 IP:

netsh http add iplisten ipaddress=10.0.0.10

关于asp.net - 找不到本地主机 (404) iis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21241709/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com