Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
 
 
DZone MVB

Links

Social

SharePoint: how to fix CKS Live ID logout

Last month I wrote about how to add SharePoint users for Live ID accounts on Community Kit for SharePoint. Another problem we found was that logout didn’t worked as expected. When logging out form Live ID we can see error on Live ID site stating that logout from our system failed.

I found a solution for this problem and it is very easy fix to apply.

  1. Open liveauth-handler.aspx.cs.
  2. Move to Render method.
  3. Paste the following code after first if.

    else if (Request.QueryString["action"] == "clearcookie")

    {

        Response.Cookies.Remove(FormsAuthentication.FormsCookieName);

        var gif = "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7";

     

        Page.Response.Clear();

        Page.Response.ClearHeaders();

        Page.Response.ContentType = "image/gif";

        Page.Response.BinaryWrite(Convert.FromBase64String(gif));

        Page.Response.Flush();

        Page.Response.End();

    }


  4. Save handler file, compile the project and deploy compiled DLL to GAC.

I hope it helps somebody.

Posted: Mar 26 2009, 01:22 PM by DigiMortal | with 1 comment(s)
Filed under: ,

Comments

SharePoint: how to fix CKS Live ID logout - Gunnar Peipman's ASP … said:

Pingback from  SharePoint: how to fix CKS Live ID logout - Gunnar Peipman's ASP …

# March 26, 2009 12:12 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)