博客园站长
这是人类成长进步中记录的每一时刻

//移除CA缓存
HttpCookie ticketCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(ticketCookie.Value);
if (CasAuthentication.ServiceTicketManager != null && ticket.UserData.Length > 0)
{
CasAuthenticationTicket casTicket = CasAuthentication.ServiceTicketManager.GetTicket(ticket.UserData);
CasAuthentication.ServiceTicketManager.RevokeTicket(casTicket.ServiceTicket);
CasAuthentication.ClearAuthCookie();

Session.Clear();
this.Session.Abandon();
Request.Cookies.Remove(FormsAuthentication.FormsCookieName);
Response.Cookies.Remove(FormsAuthentication.FormsCookieName);
CasAuthentication.SingleSignOut();
}

posted on 2016-08-19 11:55  dm3344  阅读(965)  评论(0)    收藏  举报