发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
FormsAuthentication.SetAuthCookie(sUserID, false);
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1,
sUserID,
DateTime.Now,
DateTime.Now.AddMinutes(30),
false,
sUserInfo,
FormsAuthentication.FormsCookiePath);
string hash = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hash);
Response.Cookies.Add(cookie);
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。