先说下我的环境
xp,windows7双系统。
在xp下的vs2008运行那两个网站都可以。
但在win7下都不行。以前运行都好好的。1.我浏览我的网页比如http://localhost:29357/website/Default.aspx
  提示:Internet Explorer 无法显示该网页2.浏览网页时,报错,信息如下
  “/WebSite”应用程序中的服务器错误。
--------------------------------------------------------------------------------未能映射路径“/”。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.InvalidOperationException: 未能映射路径“/”。
google了很久,仍然没找到解决办法。哪位有遇到的朋友。帮忙看下吧。  

解决方案 »

  1.   

    Win7曾经可以还是一直不行?Win7自带的是IIS7,IIS7里面检查一下默认的权限,如果你使用了Handler和Module,IIS7的配置和IIS6不太一样,你可以打开配置文件(web.config),最下面有一部分是for IIS7的,检查那里是否正确。
    该页无法显示的问题看看你的服务器程序是否运行(就是右下角那个托盘程序...)?
      

  2.   

    是不是IIS中没有配置好
    看你的地址好象是VS2008中的测试地址.http://localhost:29357/website/Default.aspx 
      

  3.   

    应该是IIS7.5设置问题,默认的windows集成验证没有开启进入IIS7.5的管理器看看权限,集成windows,匿名访问之类的
      

  4.   

    谢谢各位热心的回复,我先回答大家的疑问
    1.我没有安装NOD32,用的是微软的MSE
    2.之前运行是好好的。现在这两个website不行。其它website运行正常。
    3.至于II7配置,我不会设置,之前也没有去动过。呆会儿看下
    4.服务器程序有在运行
    5.现在这两个项目,我就是随便新建一个html来运行也会有这些错误
    6.奇怪了,我在属性标签页中,没有找到虚拟路径这个选项(vs2008 sp1 website)
    7.iis的身份验证已有启用‘匿名访问之’但是我发现了一个现象。
    如果我用administrator来登录win7,则运行这两个website是正常的。
    但用我自己的用户名就不行。可是我的这个用户名也隶属于administrator用户组另外,我也通过administrator登录后。把这些文件夹的安全选项都设置给everyone (fullcontrol)但还是不能运行。
      

  5.   

    继续post出我的问题
    刚才我进IIS里面,给我的website手动添加虚拟目录。
    运行时,出现如下错误错误摘要
    HTTP 错误 500.19 - Internal Server Error
    无法访问请求的页面,因为该页的相关配置数据无效。详细错误信息
    模块 IIS Web Core 
    通知 BeginRequest 
    处理程序 尚未确定 
    错误代码 0x80070021 
    配置错误 This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".  
    配置文件 \\?\E:\Evatic Project\Evatic_ECW\Src\WebSite\web.config 配置源
      217:  </modules>
      218:  <handlers>
      219:  <remove name="WebServiceHandlerFactory-Integrated"/>然后我google了下,说要重启下iis
    我就重启了下iis,顺便说下,
    如果你不是以管理员登录的话,最好不要直接双击visual studio 2008 command prompt
    否则在运行时会有以下错误提示:
    0x800702e4 请求的操作需要提升要右击command prompt,然后选择‘以管理员身份运行’。重启后,仍然不行。唉。
      

  6.   

    重启IIS后,提示的错误有变。有错误不怕。就怕找不到根源Request is not available in this context 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Request is not available in this contextSource Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:1. Add a "Debug=true" directive at the top of the file that generated the error. Example:  <%@ Page Language="C#" Debug="true" %>or:2) Add the following section to the configuration file of your application:<configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>
     
      

  7.   

    IIS中的问题是
    你的把 WebSite\设置成Virtual Directory并且设置成创建web Application.web.config只对web application 有效,对普通的目录和普通的virtual directory没有用。
      

  8.   

    这么来看的话是用户帐户的权限问题了。具体Win7没玩过……
    你自己的电脑自己用,为啥不直接用Administrator帐号? 我的习惯是把这帐号重命下名直接用
      

  9.   

    #findcaiyzh
    是的,我已由把把 WebSite\设置成Virtual Directory并且设置成创建web Application
    但是问题仍旧。
    应该是权限的问题#wapit
    win7在安装后,默认是没有启用administrator的。
    所以当时我就用我安装时建立的用户。然后也安装了很多软件。
    如果现在转成administrator,一些软件将重新安装。
    另外,我建立的用户,它的角色身份也是管理员。