本地主机查找失败,浏览器尝试使用 www.localhost.com
我以前一直在我的笔记本电脑上运行 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
检查您的 hosts 文件,它应该将 localhost 重定向到 127.0.0.1,而不是其他任何内容。 导致此错误的条目应如下所示:
如果找到此条目,请将其删除或将 www.localhost.com 更改为 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:
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:
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.
如果这也不起作用,请打开 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... ;)
当我的服务器关闭时,我在 Firefox 3.6 中遇到了同样的问题。
就我而言,这不是 etc/hosts 的问题,其中该行
在那里并且正常。
对我有用的解决方案是禁用 Firefox 在找不到页面时执行的“cleaver”URL 修复。 该过程取自此处:
这直接解决了问题。 无需重新启动 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
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:
This fix directly the problem. No firefox restart needed. If your server is down you get "page not found" as expected.
Hope it helps.
谢谢您的解决方案...这很好用...
Thank you for your solution ... this works fine...
需要检查一些随机事项...
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 address127.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 likeC:\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.还有一个令人震惊的可能性是您的网络服务器当前没有运行。 :)
There is also the forehead-slapping possibility that your web server is not currently running. :)