代码:FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, userInfo.UserName, DateTime.Now, DateTime.Now.AddMinutes(HttpContext.Current.Session.Timeout), false, roles); string encryptedTicket = FormsAuthentication.Encrypt(authTicket); HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket); if (string.Compare(SolutionConfig.CookieDomain, "null", true) != 0) authCookie.Domain = SolutionConfig.CookieDomain; System.Web.HttpContext.Current.Response.Cookies.Add(authCookie);然后在客户端用一个javascript个函数对Cookie做Base64解码,但得到的是乱码,看来是加过密的,有办法解密吗?
- 2 回答
- 0 关注
- 515 浏览
添加回答
举报
0/150
提交
取消