.net实现网站用户登录认证

上传:力県從吢 浏览: 23 推荐: 0 文件:PDF 大小:46.46KB 上传时间:2021-01-16 23:10:46 版权申诉
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
上传资源
用户评论