系统重装前,我把以前的C:\Inetpub下的东西复制了一份,重装后又拷回来了。程序都能打开,但是在vs.net中运行时,报错:
[试图运行项目出错:无法在web上启动调试。未将项目配置为调试。]
但是我的web.config中debug=true。
直接在浏览器中输入路径时,报错:
[Server Error in '/' Application.
--------------------------------------------------------------------------------Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: 
Line 44:            它为成员站点提供单独登录和核心配置文件服务。
Line 45:     -->
Line 46:     <authentication mode="Windows" /> 
Line 47: 
Line 48:  <!--  授权 
 Source File: c:\inetpub\wwwroot\RegistProcess\web.config    Line: 46 ]请高手指点!!!!

解决方案 »

  1.   

    设置好IIS的虚拟目录了没有。
      

  2.   

    "This error can be caused by a virtual directory not being configured as an application in IIS."
    在iis中给你的应用程序配置一个虚拟目录!!!
      

  3.   

    虚拟目录应该没问题吧。我在c:\inetpub\wwwroot\下边建立的其他项目都可以运行啊。要是虚拟目录由问题,也不会报c:\inetpub\wwwroot\RegistProcess\web.config里的错误啊!
      

  4.   

    打开iis后,新建的项目和复制过来的项目都有,但是项目名前的小图标不一样。复制过来的都是一个小文件夹图标。新建的是一个比较复杂的图标。这是虚拟目录的问题吗?怎么解决啊。
      

  5.   

    解决了!果然是虚拟目录的事情!公布一下解决方法,帮助同样困扰的人
    选中不能使用的项目,在properties->directory->application settings->application name后create就可以了。