在WEB项目中,我想让所有的用户都能浏览网页,但只有登陆的用户才能浏览A 文件夹中的页面,该怎么做?在web.config中怎么配.我用的是vs2005,c#2.0请各位指点指点

解决方案 »

  1.   

    http://msdn.microsoft.com/library/CHS/cpgenref/html/gngrflocationelement.asp
      

  2.   

    对这个文件夹下的网页建立自己的Web.config文件,设置安全认证权限就可以了
      

  3.   

    vs2005,c#2.0啊..直接用登陆控件里面得角色设置就得...默
      

  4.   

    net_lover老兄,可否给段代码给我??
      

  5.   

    TO timelyraining我那样做了,但是不行,说要把它配置成应用程序
      

  6.   

    我把问题再详细描述一下web.config 的内容如下:<system.web>
    <!-- 
                Set compilation debug="true" to insert debugging 
                symbols into the compiled page. Because this 
                affects performance, set this value to true only 
                during development.
            -->
    <compilation debug="true"/>
    <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
        <authentication mode="Forms" />
          
    <!--
                The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
    </system.web>我的主目录是/web1
    子目录是/web1/manage 和/web1/web我想所有的用户都不用通过验证就能访问除/web1/manage以外的所有页面,而访问/web1/manage中的内容时必须登陆,登陆的页面在/web1/manage下。请问该怎样在上面的web.config文件中修改,谢谢
      

  7.   

    http://msdn2.microsoft.com/en-us/library/system.io.file.setaccesscontrol.aspx