.net实现网站用户登录认证
cookie登录后同域名下的网站保持相同的登录状态。 登录 private void SetAuthCookie(string userId, bool createPersistentCookie) { var ticket = new FormsAuthenticationTicket(2, userId, DateTime.Now, DateTime.Now.AddDays(7), true, , FormsAuthentication.FormsCookiePath); string ticketEncrypted = FormsAuthentication.Encryp