我用 ASP.net develop server ,它的默认URL是 http://localhost:1343/defalut.aspx 但怎么也打不开啊。
我把它改成 http://127.0.0.1:1343/defalut.aspx 就能访问了, 怎么回事啊?

解决方案 »

  1.   

    看看你这个文件
    C:\WINDOWS\system32\drivers\etc\hosts
    看看有没有做localhost的映射。记得多结贴
      

  2.   

    # Copyright (c) 1993-1999 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 host127.0.0.1       localhost////  这是hosts里面的类容,貌似已经映射了啊!! 还是打不开!
      

  3.   

    你的系统DNF服务停掉啦???
      

  4.   

    C:\WINDOWS\system32\drivers\etc\hosts   
    127.0.0.1 localhost  
      

  5.   

    端口?? 怎么设置。。
    10楼的, hosts文件就是那样的!还是只能通过127.0.0.1访问!
    localhost 无法访问!
      

  6.   


    那个人看错了,他以为你是用IIS。
      

  7.   

    有时候中文系统不识别localhost(vs),改成local或者干脆用一点(.)
      

  8.   

    你的iis没启动吧,启动网站所在的iis可能就会好的
      

  9.   

    我没用IIS。。 就是用VS附带的  ASP.net development server。。我将 hosts里的 127.0.0.1 localhost  改为 127.0.0.1 local
    然后运行的时候输入 http://local:1343/defalut.aspx 也能顺利运行。。
    为什么啊?
    用localhost打死不行啊!
    我那个ASP.net development server默认的就是localhost,难道每次都要改啊?
      

  10.   

    1、打开Internert信息管理查看IIS是否启动,且默认网站时候已经开启;  
    2、打开http://127.0.0.1 看是否能访问IIS的默认网页,能访问则说明IIS已经成功安装到电脑上,可能是无法解析localhost;  
    3、开始--命令(cmd)--ping localhost,看是否能ping通,从127.0.0.1上返回信息,如果成功则说明可以解析localhost;  
    4、如果上一步不成功,则用记事本打开C:\WINDOWS\system32\drivers\etc\hosts文件,看里面是否有包含:127.0.0.1 localhost ,如果没有则将其添加进去,再查看能否访问localhost。  
    5、尝试将网站的主目录指向另一个目录或新建一个虚拟目录,并在该新目录创建一个新的网页文件,如index.html,然后将其加到默认网站的"文档"项中作为默认访问的网页,重新输入网址:http://localhost,看否能访问。  
    6、还是不行的话将IIS卸载掉,重新再安装一次。参考:http://topic.csdn.net/u/20080121/21/a2c26049-1382-4cda-ae5b-ecf3d0e7668c.html
      

  11.   

    18楼 兄弟。。 我没有 用IIS。。
    就用VS自带的  ASP.net develoment server 来调试程序。   
      

  12.   

    你用的本机的自动默认的站点,
    出现冲突的异常不奇怪,里面还有个sln的东东
    建议,在IIs里建虚拟目录
    就不会出现此类问题了
      

  13.   

    用过 IIS,, 还是不行!!
      

  14.   

    dnf 用QQ帐号就可以登录开启
      

  15.   

    装了skype之后 它会装个什么协议 localhost在vs里没有办法调试 遇到过 ~~忘记怎么弄的了
      

  16.   

    我 安装FumeFx出现localhost 许可证不存在 求解