复制代码 代码如下:
FormsAuthenticationTicket Ticket = new FormsAuthenticationTicket (1,"coffee",DateTime.Now, DateTime.Now.AddMinutes(20), false,UserRoles,"http://www.vevb.com/") ;
复制代码 代码如下:
string HashTicket = FormsAuthentication.Encrypt (Ticket) ;
复制代码 代码如下:
HttpCookie UserCookie = new HttpCookie(FormsAuthentication.FormsCookieName, HashTicket) ;
cookie.Domain = ".vevb.com";
复制代码 代码如下:
Response.Cookies.Add(UserCookie)
复制代码 代码如下:
Response.Redirect (Context.Request["ReturnUrl"]) ;
新闻热点
疑难解答
图片精选