如题:提示配置错误 
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误信息: 在应用程序级别以外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。导致该错误的原因可能是在 IIS 中没有将虚拟目录作为应用程序进行配置。源错误: 
行 44:            它为成员站点提供单独登录和核心配置文件服务。
行 45:     -->
行 46:     <authentication mode="Forms"> 
行 47:  <forms name=".ihaveadream" loginUrl="../login.aspx" protection="All" />
行 48:       </authentication>
 源文件: d:\inetpub\wwwroot\dream\admin\web.config    行: 46

解决方案 »

  1.   

    >>>导致该错误的原因可能是在 IIS 中没有将虚拟目录作为应用程序进行配置子目录不支持认证(authentication),但支持授权(authorization)
      

  2.   

    提示是这样的我现在的问题是,在根目录中,可以随便访问,在子目录admin中,希望通过登陆验证的才能访问,
    那么我如果在购买的虚拟空间中,好像不会给你设置两个虚拟目录呀
      

  3.   

    see
    HOW TO: Control Authorization Permissions in an ASP.NET Application
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316871try<configuration>
    <system.web>
    <authentication mode="Forms" >
    <forms loginUrl="login.aspx" name=".ASPNETAUTH" protection="None" path="/" timeout="20" >
    </forms>
    </authentication>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web> <location path="subdir1">
    <system.web>
    <authorization>
    <deny users ="?" />
    </authorization>
    </system.web>
    </location>
    </configuration>

      

  4.   

    谢谢,操作成功不过我还是不能使用这个方法了。别人修改web.config就可以有权限了。