学院首页>网络编程>C#.NET>webconfig中进行登陆的权限、修改

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

作者:- 来源:- 添加时间:2006-5-21 10:52:10

具体例码,这里是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>

站内搜索