web.config里的身份验证和授权我的站点里根目录下的文件.aspx是不需要登陆就可浏览的,我想使站点里的一个文件夹中的内容需要登陆后才能浏览这样怎样配置web.config啊下面是我的web.config文件,在根目录下<configuration>
  <system.web>    <authentication mode="Forms" > 
       <forms loginUrl="logon.aspx" name=".FormsAuthCookie"/> 
   
    </authentication>     <authorization> 
      <allow users="*"/> 
    </authorization>   </system.web>
   <location path="Customer">  Customer文件夹位于根目录下
       <deny users="?"/>
   </location>
</configuration>Login.aspx位于根目录下当我请求Customer 文件夹中的.aspx时 页面转向login.aspx,登陆之后进入Customer文件中的aspx页当我通过Customer文件中的aspx页的链接,连到Customer文件中的页时又转道Login.aspx页.还要再登陆一次怎么回事啊?多谢各位指点!!! 

解决方案 »

  1.   

    http://www.cnblogs.com/xiaotao823/archive/2006/09/02/493221.html
      

  2.   

    你最好对你的Customer文件夹下建一个webconfig文件来配置权限
    <configuration>
      <system.web>
         <authorization> 
          <allow users="*"/> 
        </authorization> 
      </system.web>
       <location path="具体的某个文件.aspx">  Customer文件夹位于根目录下
           <deny users="?"/>
       </location>
    ......
    每个页面做个权限的限制试一下吧
    </configuration>