Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public RedirectResult SignOut()
- {
- string[] myCookies = HttpContext.Request.Cookies.AllKeys;
- foreach (string cookie in myCookies)
- {
- var httpCookie = HttpContext.Response.Cookies[cookie];
- if (httpCookie != null)
- httpCookie.Expires = DateTime.Now.AddDays(-1);
- }
- Session.Clear();
- string redirectUrl = System.Configuration.ConfigurationManager.AppSettings["Path"].ToString();
- return Redirect(redirectUrl);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement