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

具体例码,这里是form格式的登陆
windows格式的在IIS中设置
webconfig:

1<authentication mode="Forms">
2<forms loginurl="login.aspx" name="mylogin">
3<credentials passwordformat="HA1">
4</credentials>
5</forms>
6</authentication>
1<authorization>
2<deny users="?"></deny>
3</authorization>
 1<configuration>
 2<system.web>
 3<trace enabled="true"></trace>
 4<authentication mode="Forms">
 5<forms loginurl="login.aspx" name="asdasdasd"></forms>
 6</authentication>
 7<authorization>
 8<deny users="?"></deny>----不允许匿名   
 9<allow users="pipp"></allow>----允许pipp   
10<deny users="*"></deny>----不允许所有用户   
11</authorization>
12</system.web>
13</configuration>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus