本地主机查找失败,浏览器尝试使用 www.localhost.com

发布于 2024-07-15 09:53:40 字数 357 浏览 9 评论 0原文

我以前一直在我的笔记本电脑上运行 Web 应用程序,没有问题,我使用的是 VWD 2008 Express,我有最新的框架,Windows Vista Home Basic...等等。 现在,当我尝试运行网站,甚至选择从 VWD 内的浏览器中显示页面时,浏览器(IE 和 Firefox)都会不断寻找 www.localhost.com...

我尝试复制地址并将其直接粘贴到标题栏中,什么也没有,同样的问题,我尝试从气球通知(运行任何 ASP.net 项目时弹出的通知)中获取该地址,仍然没有任何反应...

我的同事正面临着同样的问题,但对他来说,他可以简单地复制并粘贴网址到地址栏中,但它对我不起作用......Heeeeeellllllllllllllllp

I used to run web applications all the time on my laptop, no problems, I am using VWD 2008 Express, i have the latest framework, Windows Vista Home Basic...etc..
Now, when ever i try to run a website, or even chose to Show a Page in Browser from Within VWD, the browser (both IE and Firefox) keeps looking for www.localhost.com...

I tried to copy the address of and paste it directly in the title bar, nothing, same problem i tried to get that address from the balloon notification (the one that pops up when you run any ASP.net project), still nothing happens...

My colleague is facing the same problem, but for him, he can simply copy and paste the url in the address bar, but its not working with me....Heeeeeellllllllllllllllp

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

多彩岁月 2024-07-22 09:53:40

检查您的 hosts 文件,它应该将 localhost 重定向到 127.0.0.1,而不是其他任何内容。 导致此错误的条目应如下所示:

127.0.0.1    www.localhost.com 

如果找到此条目,请将其删除或将 www.localhost.com 更改为 localhost。

您还可以尝试在地址栏中发布其中一项:

127.0.0.1
http://localhost

请注意,主机文件是病毒的常见受害者,因此如果它已被修改,您可能会运行病毒检查。

另请参阅此处的讨论

Check your hosts file, it should be redirecting localhost to 127.0.0.1 and nothing else. The entry that will cause this error should look like this:

127.0.0.1    www.localhost.com 

If you find this, remove it or change www.localhost.com to localhost.

You can also try to post one of these in the adress bar:

127.0.0.1
http://localhost

Note that the hosts file is a popular victim of viruses, so if is has been modified, you might run a check on viruses.

Also see the discussion here.

小傻瓜 2024-07-22 09:53:40

如果这也不起作用,请打开 nod32(如果上述方法不起作用,您可能已经在系统上安装了它)进入高级设置,在左侧菜单上选择协议过滤,然后选择 HTTP 和 POP3 端口。 ..;)

If that also doesn't work, open up nod32 (you probably have it installed on your system if the above methods don't work) go to advanced setup, on the left menu, select protocol filtering, and select HTTP and POP3 ports... ;)

天煞孤星 2024-07-22 09:53:40

当我的服务器关闭时,我在 Firefox 3.6 中遇到了同样的问题。
就我而言,这不是 etc/hosts 的问题,其中该行

127.0.0.1本地主机

在那里并且正常。

对我有用的解决方案是禁用 Firefox 在找不到页面时执行的“cleaver”URL 修复。 该过程取自此处

  1. 在地址栏中输入 about:config 并按回车键。
  2. 查找 browser.fixup.alternate.enabled
  3. 双击“true”值。 该线条将变得粗体,并且
    值将更改为“false”

这直接解决了问题。 无需重新启动 Firefox。 如果您的服务器已关闭,您将按预期收到“找不到页面”。
希望能帮助到你。

I got the same problem in firefox 3.6 when my server was down.
In my case it was not a problem with etc/hosts where the line

127.0.0.1 localhost

was there and OK.

The solution that worked for me was to disable the "cleaver" URL fixing that Firefox carry out when the page is not found. The procedure taken from here:

  1. Type about:config in the address bar and hit return.
  2. find browser.fixup.alternate.enabled
  3. double click the “true” value. The line will become bold, and the
    value will change to “false”

This fix directly the problem. No firefox restart needed. If your server is down you get "page not found" as expected.
Hope it helps.

神妖 2024-07-22 09:53:40

谢谢您的解决方案...这很好用...

我在 Firefox 3.6 中遇到了同样的问题
当我的服务器宕机时。 就我而言
不是 etc/hosts 的问题
线

<前><代码>127.0.0.1 本地主机

在场,一切顺利。

对我有用的解决方案是
禁用“cleaver” URL 修复该问题
Firefox 在页面不存在时执行
成立。 程序取自此处:

 1. 在地址栏中输入 about:config 并按回车键。 
     2.找到browser.fixup.alternate.enabled 
     3. 双击“true”值。   该线将变得粗体,并且 
  

该值将更改为“false”

这直接解决了问题。 不
需要重新启动火狐浏览器。 如果你的服务器
已关闭,您会收到“找不到页面”的信息
预期的。 希望能帮助到你。 链接|标志
华金于 9 月 3 日 7:55 回复
2,237112

Thank you for your solution ... this works fine...

I got the same problem in firefox 3.6
when my server was down. In my case it
was not a problem with etc/hosts where
the line

127.0.0.1 localhost

was there and OK.

The solution that worked for me was to
disable the "cleaver" URL fixing that
Firefox carry out when the page is not
found. The procedure taken from here:

   1. Type about:config in the address bar and hit return.
   2. find browser.fixup.alternate.enabled
   3. double click the “true” value. The line will become bold, and

the value will change to “false”

This fix directly the problem. No
firefox restart needed. If your server
is down you get "page not found" as
expected. Hope it helps. link|flag
answered Sep 3 at 7:55 joaquin
2,237112

自我难过 2024-07-22 09:53:40

需要检查一些随机事项...

  • localhost 是 IP 地址 127.0.0.1 的常规名称。 如果该地址不起作用,则说明存在网络配置问题。

  • 某个地方会有一个 hosts 文件,可能在 C:\Windows\System32\Drivers\Etc\hosts 这样的地方,通常应该只包含 localhost 的定义。 如果其中有更多名称,而您没有将它们放在那里,那么您完全遇到了另一个问题。

A couple of random things to check...

  • localhost is the conventional name for the IP address 127.0.0.1. If that address doesn't work, then you have a network configuration problem.

  • There will be a hosts file somewhere, probably in somewhere like C:\Windows\System32\Drivers\Etc\hosts which should usually contain only that definition for localhost. If it has more names in it and you didn't put them there, then you have another problem entirely.

○闲身 2024-07-22 09:53:40

还有一个令人震惊的可能性是您的网络服务器当前没有运行。 :)

There is also the forehead-slapping possibility that your web server is not currently running. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文