none
Problem with Sign-Out in Sharepoint 2013

    Question

  • Hi,

       I enabled claims based authentication in Sharepoint 2013 and it works fine. Unfortunatelly when I click Sign-Out button I got error like described in this thread:

    http://blog.lekman.com/2012/07/resolved-sign-out-from-forms.html

    I don't have custom login page so I don't know where I can put this code to clear session or cookies ? Please help if anybody know whatever about it. Thanx.

    • Moved by Hemendra Agrawal Wednesday, December 26, 2012 1:09 PM (From:SharePoint 2010 - General Discussions and Questions)
    Wednesday, December 26, 2012 12:48 PM

All replies

  •  Please help if anybody know something about that issue ?
    Wednesday, December 26, 2012 8:08 PM
  • Hi,

       I've got error like below in Sharepoint 2013 when trying sing-out:

    Exception of type ‘System.ArgumentException' was thrown. Parameter name: encodedValue
    
    SPClaimEncodingManager.DecodeClaimFromFormsSuffix

     I've just enabled out-of-the-box forms authentication and when I try to sign-out from Windows user I've got error like above. Problem only occures in the Sharepoint 2013 but in 2010 works fine with FBA or SAML.

    Please help.


    • Edited by CaMeL023 Thursday, December 27, 2012 8:20 PM
    Thursday, December 27, 2012 8:19 PM
  • Hmm..I don't see that issue in the above list ;/ How can I resolve it in another way ?
    Friday, December 28, 2012 10:07 AM
  • I was tying to find more information about that issue but I see a big problem here. When I use only Windows Authentication it seems to work, but when I enable forms auth OOTB and login as Windows user and try to sign-out there is a problem like above - I got error:

    Exception of type System.ArgumentException' was thrown. Parameter name: encodedValue
    
    SPClaimEncodingManager.DecodeClaimFromFormsSuffix

    If anybody got sth like that please help. Of course I don't use any custom login page or sth like that.

    Thanx for any help.

    Friday, December 28, 2012 4:37 PM
  • Hi,

     I have still problem with Sign-Out when using forms authentication. I created custom sign-out application page with code as below:

    protected override void OnLoad(EventArgs e)
    {
     base.OnLoad(e);
    
     FormsAuthentication.SignOut();
     var authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
            // Clear .ASPAUTH cookie key.
     if (authCookie != null)
     {
      var myCookie = new HttpCookie(authCookie.Name)
    
                   {Expires = DateTime.Now.AddDays(-1)};
      Response.Cookies.Add(myCookie);
     }
    
     SPIisSettings iisSettingsWithFallback = 
    
             Site.WebApplication.GetIisSettingsWithFallback(Site.Zone);
     if (iisSettingsWithFallback.UseClaimsAuthentication)
     {
      FederatedAuthentication.SessionAuthenticationModule.SignOut();
                    // Clear FedAuth Cookie key
      FederatedAuthentication.SessionAuthenticationModule.DeleteSessionokenCookie();
     }
    
    
     SPUtility.Redirect(Web.ServerRelativeUrl, SPRedirectFlags.Default,
    
              Context);
    }
    

    But I got the same error: http://lh6.ggpht.com/-Qp0aGysVfy0/UBZfKYmy0rI/AAAAAAAAAbc/T6vdolrob5g/s1600-h/Untitled4.png

    Please help how to correctly redirect to signout.aspx without error?

    Saturday, December 29, 2012 6:51 PM
  • Hi,

     Can anybody know how to resolved this issue? This error occured when multiple providers are enabled, f.ex WINDOWS and FORMS. When I logged as WIN user and click SignOut then this error appears:

    http://lh6.ggpht.com/-Qp0aGysVfy0/UBZfKYmy0rI/AAAAAAAAAbc/T6vdolrob5g/s1600-h/Untitled4.png

    Thanx for any info.

    Thursday, April 04, 2013 4:42 PM
  • Hi, you can use solution from this post It helps with sign out from both SharePoint and SSO provider. Just download projects from this article and deploy it into your SharePoint farm.

    Hope it helps.


    Tuesday, April 30, 2013 10:42 AM