dhl:mvc用户登陆身份验证
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                dhl:mvc用户登陆身份验证
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            登錄:  [HttpPost]public ActionResult LoginSuccess()
{bool rememberMe = Request["rememberMe"].Contains("true");
UserAccount account = ia.GetUserAccountByUserName(brief.UserName);//驗證成功string usercookie = account.UIN + "," + brief.UserName;FormsAuthentication.SetAuthCookie(usercookie, rememberMe);}
  
                        
                        
                        ?
注銷:
public ActionResult LoginOut(){FormsAuthentication.SignOut(); }?
判斷是否登陸:
[AuthorizeAttribute]public ActionResult Payment(int? lid,long? classid){}
?
webcofig:
<authentication mode="Forms"><forms loginUrl="~/Account/Login" timeout="2880" /></authentication>
?
沒有登錄時候
ie地址欄:
http://localhost/Account/Login?ReturnUrl=%2fShoppingCart%2fpayment%3flid%3d1%26classid%3d10010%26type%3dbuy&lid=1&classid=10010&type=buy
?
?
?
?
?
轉載于:https://www.cnblogs.com/dudu837/archive/2010/10/20/1856843.html
總結
以上是生活随笔為你收集整理的dhl:mvc用户登陆身份验证的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: Office开发程序集版本及部署问题
- 下一篇: Combox使用的一些技巧
