webconfig中进行登陆的权限、修改

来源:互联网 发布:中国网络邮政学院 编辑:程序博客网 时间:2024/06/08 19:57

作者Blog:http://blog.csdn.net/pipp/
具体例码,这里是form格式的登陆
windows格式的在IIS中设置
webconfig:


 <authentication mode="Forms">
    <forms  name="mylogin" loginUrl="login.aspx">
    <credentials passwordFormat="HA1">
    </credentials>
    </forms>
 </authentication>
       <authorization>
         <deny users="?"/>
             </authorization>

<configuration>
<system.web>
    <trace enabled="true" />
    <authentication mode="Forms">
      <forms name="asdasdasd" loginUrl="login.aspx" />
    </authentication>
<authorization>
       <deny users="?" />----不允许匿名
       <allow users="pipp" />----允许pipp
       <deny users="*" />----不允许所有用户
    </authorization>
  </system.web>
</configuration>

 

原创粉丝点击