win7 VS2010编写的页面无法通过浏览器访问,将localhost换成127.0.0.1可以浏览。

lonelyweiwei 2012-07-11 01:58:04
win7 VS2010玩过网游后编写的页面无法通过浏览器访问,将localhost换成127.0.0.1可以浏览。
网上查原因,我的注册表信息里的DataBasePath 类型已经是REG_EXPAND_SZ,
本地连接IPv6已禁用。
hosts 文件如下:

# 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

网上说玩过游戏后有冲突但没有说解决办法。我认同,我前段时间运行都正常,昨天晚上下载了《英雄联盟》,玩了一会,今天早上就不行了,那位高手能解决。感激不尽!!!!
...全文
125 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lonelyweiwei 2012-07-11
  • 打赏
  • 举报
回复
问题已解决。非常感谢回复者。修改hosts权限,属性--安全--编辑。为用户勾上权限便可修改。我在hosts文件后加了127.0.0.1 localhost就行了,好像中间空格也要正确。好了,谢谢。郁闷一天了,哈哈
lonelyweiwei 2012-07-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
localhost 127.0.0.1
localhost ::1
加上这句在hosts里面试试
[/Quote]
用加上”#“吗?
我用记事本打开后保存时访问被拒绝。怎样解决??谢谢。
lonelyweiwei 2012-07-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
localhost 127.0.0.1
localhost ::1
加上这句在hosts里面试试
[/Quote]
是在hosts文件下直接加上
localhost 127.0.0.1
localhost ::1
,保存怎么保存,我的访问被拒绝
licai1210 2012-07-11
  • 打赏
  • 举报
回复
localhost 127.0.0.1
localhost ::1
加上这句在hosts里面试试

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧