CahitEy
asked on
FormsAuthentication.Signout is not working
I tryed all this methods given below : but i could not able to complete sign out please help me
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cookies.Item(FormsAuthentication.FormsCookieName).Expires = Date.Now.AddDays(-1)
Response.Cookies.Item(FormsAuthentication.FormsCookieName).Value = "crap"
FormsAuthentication.SignOut()
Session.Abandon()
Session.Clear()
Session.RemoveAll()
Dim authTicket As FormsAuthenticationTicket = New FormsAuthenticationTicket(1, _
User.Identity.Name, DateTime.Now, DateTime.Now.AddMinutes(-20), False, "")
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(Now.AddSeconds(-1))
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
Me.Response.Expires = 0
Me.Response.Cache.SetCacheability(HttpCacheability.NoCache)
Session.Abandon()
FormsAuthentication.SignOut()
Response.Cookies(FormsAuthentication.FormsCookieName).Expires = DateAdd(DateInterval.Year, -1, DateTime.Now)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER