Monday, 16 May 2011

Sign out problem in SharePoint 2010

I solved my problem :)


  if (HttpContext.Current.Request.Cookies["FedAuth"] != null)
{
HttpCookie requestCookie = new HttpCookie("FedAuth");
requestCookie.Secure = false;
requestCookie.Expires = DateTime.Now.AddYears(-1);
}
FederatedAuthentication.SessionAuthenticationModule.SignOut();
FormsAuthentication.SignOut();

Response.Redirect("~/redirecturl");

No comments:

Post a Comment