ASP.NET 的 Form验证
1。站点安全用户验证匿名即可
2。WebConfig:
<authentication mode="Forms">
<forms loginUrl="logon.aspx" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
3。System.Web.Security.FormsAuthentication.RedirectFromLoginPage(strUserName, true);
登录转到访问页面,如:default.aspx,并建立user Cookie
4。System.Web.Page.User.Identity.IsAuthenticated
用于验证是否登录,登录为:True
5。退出登录
System.Web.Security.FormsAuthentication.SingOut();
2。WebConfig:
<authentication mode="Forms">
<forms loginUrl="logon.aspx" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
3。System.Web.Security.FormsAuthentication.RedirectFromLoginPage(strUserName, true);
登录转到访问页面,如:default.aspx,并建立user Cookie
4。System.Web.Page.User.Identity.IsAuthenticated
用于验证是否登录,登录为:True
5。退出登录
System.Web.Security.FormsAuthentication.SingOut();